const MIN_NORMAL_VALUE = Number.MIN_VALUE / Number.EPSILON;
const MAX_POW_OF_2 = Number.MAX_VALUE / (2 - Number.EPSILON);

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// floor, ceil, round, trunc, abs, sign
const ROUND = [
  0,
  Number.MIN_VALUE,
  Number.MIN_VALUE * 2,
  MIN_NORMAL_VALUE + Number.MIN_VALUE * -1,
  MIN_NORMAL_VALUE + Number.MIN_VALUE * 0,
  MIN_NORMAL_VALUE + Number.MIN_VALUE * 1,
  Number.EPSILON * 0.5 + Number.EPSILON * Number.EPSILON * -0.25,
  Number.EPSILON * 0.5 + Number.EPSILON * Number.EPSILON * 0,
  Number.EPSILON * 0.5 + Number.EPSILON * Number.EPSILON * 0.5,
  Number.EPSILON + Number.EPSILON * Number.EPSILON * -0.5,
  Number.EPSILON + Number.EPSILON * Number.EPSILON * 0,
  Number.EPSILON + Number.EPSILON * Number.EPSILON * 1,
  0.5 + Number.EPSILON * -0.25,
  0.5 + Number.EPSILON * 0,
  0.5 + Number.EPSILON * 0.5,
  1 + Number.EPSILON * -0.5,
  1 + Number.EPSILON * 0,
  1 + Number.EPSILON * 1,
  1.5 + Number.EPSILON * -1,
  1.5 + Number.EPSILON * 0,
  1.5 + Number.EPSILON * 1,
  2 + Number.EPSILON * -1,
  2 + Number.EPSILON * 0,
  2 + Number.EPSILON * 2,
  2.5 + Number.EPSILON * -2,
  2.5 + Number.EPSILON * 0,
  2.5 + Number.EPSILON * 2,
  3 + Number.EPSILON * -2,
  3 + Number.EPSILON * 0,
  3 + Number.EPSILON * 2,
  3.5 + Number.EPSILON * -2,
  3.5 + Number.EPSILON * 0,
  3.5 + Number.EPSILON * 2,
  4 + Number.EPSILON * -2,
  4 + Number.EPSILON * 0,
  4 + Number.EPSILON * 4,
  Number.MAX_SAFE_INTEGER * 0.25 - 1.75,
  Number.MAX_SAFE_INTEGER * 0.25 - 1.5,
  Number.MAX_SAFE_INTEGER * 0.25 - 1.25,
  Number.MAX_SAFE_INTEGER * 0.25 - 1,
  Number.MAX_SAFE_INTEGER * 0.25 - 0.75,
  Number.MAX_SAFE_INTEGER * 0.25 - 0.5,
  Number.MAX_SAFE_INTEGER * 0.25 - 0.25,
  Number.MAX_SAFE_INTEGER * 0.25 + 0,
  Number.MAX_SAFE_INTEGER * 0.25 + 0.25,
  Number.MAX_SAFE_INTEGER * 0.25 + 0.75,
  Number.MAX_SAFE_INTEGER * 0.25 + 1.25,
  Number.MAX_SAFE_INTEGER * 0.25 + 1.75,
  Number.MAX_SAFE_INTEGER * 0.25 + 2.25,
  Number.MAX_SAFE_INTEGER * 0.5 - 1.5,
  Number.MAX_SAFE_INTEGER * 0.5 - 1,
  Number.MAX_SAFE_INTEGER * 0.5 - 0.5,
  Number.MAX_SAFE_INTEGER * 0.5 + 0,
  Number.MAX_SAFE_INTEGER * 0.5 + 0.5,
  Number.MAX_SAFE_INTEGER * 0.5 + 1.5,
  Number.MAX_SAFE_INTEGER * 0.5 + 2.5,
  Number.MAX_SAFE_INTEGER - 1,
  Number.MAX_SAFE_INTEGER + 0,
  Number.MAX_SAFE_INTEGER + 1,
  Number.MAX_SAFE_INTEGER + 3,
  MAX_POW_OF_2 + MAX_POW_OF_2 * Number.EPSILON * -0.5,
  MAX_POW_OF_2 + MAX_POW_OF_2 * Number.EPSILON * 0,
  MAX_POW_OF_2 + MAX_POW_OF_2 * Number.EPSILON * 1,
  Number.MAX_VALUE - MAX_POW_OF_2 * Number.EPSILON,
  Number.MAX_VALUE,
  Infinity
]
  .reduce((a, x) => a.concat(x, -x), [])
  .concat(NaN);

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const SQRT = [
  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // special cases
  0,
  Number.MIN_VALUE,
  Number.MIN_VALUE * 2,
  Number.MIN_VALUE * 3,
  Number.MIN_VALUE * 4,
  MIN_NORMAL_VALUE + Number.MIN_VALUE * -1,
  MIN_NORMAL_VALUE + Number.MIN_VALUE * +0,
  MIN_NORMAL_VALUE + Number.MIN_VALUE * +1,
  1 + Number.EPSILON * -0.5,
  1 + Number.EPSILON * +0,
  1 + Number.EPSILON * +1,
  2 + Number.EPSILON * -1,
  2 + Number.EPSILON * +0,
  2 + Number.EPSILON * +2,
  Number.MAX_VALUE - MAX_POW_OF_2 * Number.EPSILON,
  Number.MAX_VALUE,
  Infinity,
  -0,
  -Number.MIN_VALUE,
  -MIN_NORMAL_VALUE,
  -1,
  -Number.MAX_VALUE,
  -Infinity,
  NaN,

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // random cases
  2.6281098355411871e80,
  5.1271016230127514e192,
  4.3455795346962495e-152,
  1.1634896647518325e202,
  3.6629735091031125e-145,
  2.1912443378472021e-188,
  2.8723000727772886e35,
  1.4339974420712784e-250,
  2.9248912521266593e256,
  3.815932950816022e265,
  2.5715028432009735e-114,
  4.187198431886659e272,
  1.1680392069182001e256,
  3.4261607075382263e290,
  4.0084871334746833e62,
  1.0271061589169505e-133,
  1.2912384038699781e212,
  9.2940171284244835e204,
  4.5045898298471954e52,
  8.3102016395703745e258,
  2.4286727813395016e-116,
  1.2653692992239854e-264,
  6.8329081209880025e122,
  3.1011228024406649e227,
  5.5256228640890782e-88,
  1.4633424819382225e10,
  1.3937071761622237e-8,
  4.9446226899961031e175,
  1.165836640060056e-116,
  1.3818921846305247e-97,
  2.5641309627838674e-54,
  2.1008452354255354e-269,
  3.3140765839195555e33,
  9.7595864239027162e-252,
  6.6497646106640322e-189,
  1.5344984782247704e91,
  3.7761089600752291e-68,
  1.1167103510342029e83,
  3.1030098345464744e247,
  3.3839689444457618e-266,
  1.0898916991549164e233,
  3.3533905183561372e162,
  5.7435041168571302e19,
  2.233877961521088e56,
  3.0878270913433823e-78,
  8.7877742122431775e295,
  2.9901330022430022e241,
  5.9926440283449191e-128,
  3.3320629597711749e-50,
  2.5095216150620501e6,
  2.5940688536791409e32,
  8.543126629188431e-87,
  4.0652252581966113e-117,
  3.602761994387795e-108,
  6.2881620496386814e-162,
  3.6491746461250013e306,
  1.7085723719105738e259,
  5.867635836866051e111,
  3.2065770657524818e-203,
  1.0684879350191407e-32,
  1.5230454360912978e2,
  3.9207796416815682e6,
  5.2264953535539798e-301,
  6.8951518665211472e-63,
  2.2551207235694612e174,
  4.8342601084368729e258,
  3.8963087034210406e-250,
  9.7044216404402259e-138,
  1.4259850655033996e-124,
  3.7662326983363557e9,
  3.0356802514605821e112,
  4.0365058311207057e5,
  7.7702784671229856e79,
  2.2028004501907029e-8,
  4.5683569722077797e221,
  4.0549238977119473e123,
  2.9771492387378477e-66,
  4.6062834320604658e1,
  2.8630505371683167e-165,
  4.407011813827421e275,
  4.7295167545829354e125,
  1.8794012487989647e100,
  3.1683770764819493e-203,
  4.7709242649037885e-247,
  5.8600249122593096e206,
  3.2052721963350364e44,
  3.2043507554723201e9,
  1.6703257019468024e5,
  1.4691044643090778e161,
  9.7119925968960515e-225,
  3.9432467187226848e-215,
  3.7111701468739371e-242,
  2.1707202292241503e-270,
  3.9052166133486123e36,
  3.2364464491862759e227,
  1.7140268721664734e-148,
  1.6440568635821904e-223,
  6.8638402040532314e270,
  5.4829005449452484e-294,
  5.4438042719289577e107,

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // subnormal cases
  1e-320,
  2e-320,
  1e-316,
  2e-316,
  1e-312,
  2e-312,
  1e-308,
  2e-308,

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // difficult cases
  // sqrt(x) lies very close to the midpoint of gap between two Numbers
  // test if it correctly returns the nearest one
  1.0000000000000002,
  3.9999999999999996,
  1.828242970224758,
  2.7154908522261261,
  1.0000000000000007,
  3.9999999999999987,
  1.1680200140908301,
  1.1460784549969931,
  1.9124843487917811,
  2.6149282895352894,
  1.0000000000000011,
  3.9999999999999978,
  1.7276116983152652,
  1.6582308716894396,
  2.9318920633779748,
  1.1525082473616046,
  1.1570931453597399,
  1.5834580943080743,
  3.0333262149902915,
  1.0000000000000016,
  3.9999999999999969,
  1.4498840699214841,
  2.2092768400199043,
  1.1159303780269263,
  1.7391857996447404,
  2.8264941724416017,
  1.5026928450702755,
  3.1476304780654982,
  1.1139006918546721,
  3.7814110624302231,
  1.0807313032357206,
  1.000000000000002,
  3.999999999999996,
  1.7227036201901234,
  2.1039103810538751,
  1.1045686083056403,
  3.798661068624849,
  1.4033042574220396,
  1.927857750338188,
  1.0522672317192794,
  1.355559245947155,
  1.0258096927024301,
  3.9488738746040126,
  2.0023327238771365,
  1.0000000000000024,
  3.9999999999999951,
  1.4941920173428498,
  2.4590500174944814,
  1.543183171421131,
  2.2512927508899301,
  1.1917766924632807,
  3.6416651721395157,
  1.3872159414491356,
  3.3204080416849937,
  2.1191511019244875,
  1.4680996356947911,
  1.1781114398641104,
  1.1649862484908651,
  1.8729020130749523,
  2.6616613960489062,
  1.0000000000000029,
  3.9999999999999942,
  1.5360460156371911,
  3.0998066056303508,
  1.5163086567031006,
  3.1279995374721232,
  2.3604397683504321,
  1.1841319389467517,
  1.2524078345961198,
  3.5377461122559457,
  1.4632140585118973,
  1.684716211085632,
  1.2571426789823792,
  1.3196909613565548,
  1.389300439642549,
  1.0188167470673939,
  1.5733166620703967,
  3.0474014463285743,
  1.182537306371271,
  1.0000000000000033,
  3.9999999999999933,
  1.0220927881489246,
  1.5215624603144793,
  1.092586765694733,
  3.8209742485656344,
  1.2881833651759071,
  3.4782934140582933,
  2.5043368316977581,
  1.1132854872670701,
  1.1192571958723905,
  1.7312472724485,
  1.1266809789695078,
  3.7579671965090116,
  1.9995983752789372,
  2.5151690185076911,
  2.1420140292730734,
  2.4019718757923774,
  1.1169122599070007,
  3.7758680748652322,
  2.0909574467634786
];

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// sin, cos, tan
const TRIG = [
  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // special cases
  {
    x: 0,
    sin: [0, 0],
    cos: [1, 0],
    tan: [0, 0]
  },
  {
    x: -0,
    sin: [-0, -0],
    cos: [1, 0],
    tan: [-0, -0]
  },
  {
    x: Number.MIN_VALUE,
    sin: [Number.MIN_VALUE, -0],
    cos: [1, -0],
    tan: [Number.MIN_VALUE, 0]
  },
  {
    x: -Number.MIN_VALUE,
    sin: [-Number.MIN_VALUE, 0],
    cos: [1, -0],
    tan: [-Number.MIN_VALUE, -0]
  },
  {
    x: MIN_NORMAL_VALUE,
    sin: [MIN_NORMAL_VALUE, -0],
    cos: [1, -0],
    tan: [MIN_NORMAL_VALUE, 0]
  },
  {
    x: -MIN_NORMAL_VALUE,
    sin: [-MIN_NORMAL_VALUE, 0],
    cos: [1, -0],
    tan: [-MIN_NORMAL_VALUE, -0]
  },
  {
    x: 0.52359877559829893,
    sin: [0.5, 4.6422502234037016e-17],
    cos: [0.8660254037844386, 2.3373376947757236e-17],
    tan: [0.57735026918962584, -6.0999039597532431e-18]
  },
  {
    x: -0.52359877559829893,
    sin: [-0.5, -4.6422502234037016e-17],
    cos: [0.8660254037844386, 2.3373376947757236e-17],
    tan: [-0.57735026918962584, 6.0999039597532431e-18]
  },
  {
    x: 0.78539816339744828,
    sin: [0.70710678118654746, 4.1036934489363755e-17],
    cos: [0.70710678118654757, -2.6687565161377235e-17],
    tan: [0.99999999999999989, 4.9789962505148e-17]
  },
  {
    x: -0.78539816339744828,
    sin: [-0.70710678118654746, -4.1036934489363755e-17],
    cos: [0.70710678118654757, -2.6687565161377235e-17],
    tan: [-0.99999999999999989, -4.9789962505148e-17]
  },
  {
    x: 1.0471975511965979,
    sin: [0.86602540378443871, -7.2427930309265954e-18],
    cos: [0.49999999999999989, 1.8177297994441619e-17],
    tan: [1.7320508075688776, 8.5094338948442892e-17]
  },
  {
    x: -1.0471975511965979,
    sin: [-0.86602540378443871, 7.2427930309265954e-18],
    cos: [0.49999999999999989, 1.8177297994441619e-17],
    tan: [-1.7320508075688776, -8.5094338948442892e-17]
  },
  {
    x: 1.5707963267948966,
    sin: [1, -1.8296334471678741e-33],
    cos: [6.123233995736766e-17, -1.4973849048591698e-33],
    tan: [16331239353195370, -0.24403226295847108]
  },
  {
    x: -1.5707963267948966,
    sin: [-1, 1.8296334471678741e-33],
    cos: [6.123233995736766e-17, -1.4973849048591698e-33],
    tan: [-16331239353195370, 0.24403226295847108]
  },
  {
    x: 2.0943951023931957,
    sin: [0.86602540378443849, 5.3989546926441045e-17],
    cos: [-0.50000000000000022, 3.6354595988883256e-17],
    tan: [-1.7320508075688765, 9.1180756167709527e-17]
  },
  {
    x: -2.0943951023931957,
    sin: [-0.86602540378443849, -5.3989546926441045e-17],
    cos: [-0.50000000000000022, 3.6354595988883256e-17],
    tan: [1.7320508075688765, -9.1180756167709527e-17]
  },
  {
    x: 2.3561944901923448,
    sin: [0.70710678118654757, 1.6610237650397429e-17],
    cos: [-0.70710678118654746, 2.26086832241091e-18],
    tan: [-1.0000000000000002, 3.8347585052928315e-17]
  },
  {
    x: -2.3561944901923448,
    sin: [-0.70710678118654757, -1.6610237650397429e-17],
    cos: [-0.70710678118654746, 2.26086832241091e-18],
    tan: [1.0000000000000002, -3.8347585052928315e-17]
  },
  {
    x: 2.6179938779914944,
    sin: [0.49999999999999994, 1.5694908699429138e-17],
    cos: [-0.86602540378443871, 3.7858963009610421e-17],
    tan: [-0.57735026918962573, 2.7850834844298908e-17]
  },
  {
    x: -2.6179938779914944,
    sin: [-0.49999999999999994, -1.5694908699429138e-17],
    cos: [-0.86602540378443871, 3.7858963009610421e-17],
    tan: [0.57735026918962573, -2.7850834844298908e-17]
  },
  {
    x: 3.1415926535897931,
    sin: [1.2246467991473532e-16, -2.99476980971834e-33],
    cos: [-1, 7.5111267831102198e-33],
    tan: [-1.2246467991473532e-16, 2.994769809718339e-33]
  },
  {
    x: -3.1415926535897931,
    sin: [-1.2246467991473532e-16, 2.99476980971834e-33],
    cos: [-1, 7.5111267831102198e-33],
    tan: [1.2246467991473532e-16, -2.994769809718339e-33]
  },
  {
    x: 4.7123889803846897,
    sin: [-1, 1.6851887013388314e-32],
    cos: [-1.8369701987210297e-16, -7.8337969295007993e-33],
    tan: [5443746451065123, 0.25198924568050957]
  },
  {
    x: -4.7123889803846897,
    sin: [1, -1.6851887013388314e-32],
    cos: [-1.8369701987210297e-16, -7.8337969295007993e-33],
    tan: [-5443746451065123, -0.25198924568050957]
  },
  {
    x: 6.2831853071795862,
    sin: [-2.4492935982947064e-16, 5.9895396194366814e-33],
    cos: [1, -2.9948210635221518e-32],
    tan: [-2.4492935982947064e-16, 5.9895396194366739e-33]
  },
  {
    x: -6.2831853071795862,
    sin: [2.4492935982947064e-16, -5.9895396194366814e-33],
    cos: [1, -2.9948210635221518e-32],
    tan: [2.4492935982947064e-16, -5.9895396194366739e-33]
  },
  {
    x: Number.MAX_VALUE,
    sin: [0.004961954789184062, -2.5049377676494104e-19],
    cos: [-0.99998768942655991, -2.6032890267216748e-17],
    tan: [-0.0049620158744448951, 2.4105865734856495e-19]
  },
  {
    x: -Number.MAX_VALUE,
    sin: [-0.004961954789184062, 2.5049377676494104e-19],
    cos: [-0.99998768942655991, -2.6032890267216748e-17],
    tan: [0.0049620158744448951, -2.4105865734856495e-19]
  },
  {
    x: Infinity,
    sin: [NaN, NaN],
    cos: [NaN, NaN],
    tan: [NaN, NaN]
  },
  {
    x: -Infinity,
    sin: [NaN, NaN],
    cos: [NaN, NaN],
    tan: [NaN, NaN]
  },
  {
    x: NaN,
    sin: [NaN, NaN],
    cos: [NaN, NaN],
    tan: [NaN, NaN]
  },

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // random cases (small)
  {
    x: -9.1614621229262241,
    sin: [-0.26028352521013343, 2.6016375249489376e-17],
    cos: [-0.96553222965584418, -1.5691691817245976e-17],
    tan: [0.26957518062645019, 1.1076405797626655e-17]
  },
  {
    x: 8.4196842017315667,
    sin: [0.84421222612026547, -3.0531346681604868e-17],
    cos: [-0.53600906454001862, 3.6217878214745617e-17],
    tan: [-1.5749961744485317, -1.0442897603898185e-16]
  },
  {
    x: 11.783932362151248,
    sin: [-0.70501071346359534, -1.884373394921413e-17],
    cos: [0.7091966538990101, -5.2122334432667022e-17],
    tan: [-0.99409763087233805, 1.4957736342189975e-17]
  },
  {
    x: -7.0111792093374419,
    sin: [-0.6653734013616639, -1.13970028587943e-17],
    cos: [0.74651070773325823, 1.6669173074405173e-17],
    tan: [-0.89131126247610881, -2.228769210896972e-17]
  },
  {
    x: -4.821287878749283,
    sin: [0.9940763724503987, -4.9819620361302204e-17],
    cos: [0.10868378782438665, 7.3771342871597799e-19],
    tan: [9.1465009855623212, -1.172398558923838e-16]
  },
  {
    x: 1.1867830291789794,
    sin: [0.92716854655173686, -3.630268227151893e-18],
    cos: [0.3746444798540875, -1.1104387235429025e-17],
    tan: [2.4747956967438585, -7.9968184830621496e-17]
  },
  {
    x: -7.8318151582107527,
    sin: [-0.99975433373541922, -1.9035239192033143e-17],
    cos: [0.022164660548900084, -6.0970225051774994e-19],
    tan: [-45.105781409543482, -4.8420524771779769e-16]
  },
  {
    x: 12.387458217574032,
    sin: [-0.17795943618827423, 1.3580072801188701e-18],
    cos: [0.98403782400452044, -8.3253630800300085e-20],
    tan: [-0.18084613400740246, -6.0200804047928984e-18]
  },
  {
    x: 12.4774340250646,
    sin: [-0.088819391780011553, -4.3038921933963699e-18],
    cos: [0.996047747672685, 2.2263523937423697e-17],
    tan: [-0.089171821318347916, 2.9252195030131453e-18]
  },
  {
    x: 11.754455825866689,
    sin: [-0.72560608946012028, 4.0150150828043676e-17],
    cos: [0.68811031305917225, -4.7878080365971058e-17],
    tan: [-1.0544909379925596, 7.655667459988154e-17]
  },
  {
    x: 5.6759522217664653,
    sin: [-0.57059737405493383, -3.5788958359368037e-17],
    cos: [0.82122995361933426, -9.2461667656989836e-18],
    tan: [-0.69480828303959252, -3.3724114284754856e-17]
  },
  {
    x: 12.091605386058248,
    sin: [-0.45712965381390969, 8.6927766342470404e-19],
    cos: [0.88940006723857123, 2.9578512094638827e-17],
    tan: [-0.51397528587243735, -2.3239595990029667e-17]
  },
  {
    x: -9.805243659457803,
    sin: [0.37135290707838597, -1.4398038645092688e-17],
    cos: [-0.92849179770444479, -1.0460671273556452e-17],
    tan: [-0.39995281379598585, 1.4567591655799551e-17]
  },
  {
    x: 7.4922173564518069,
    sin: [0.93527385791774797, -4.4576247364753649e-17],
    cos: [0.35392486589056193, 8.4348291950800407e-18],
    tan: [2.6425774170016822, -1.2565419858693872e-16]
  },
  {
    x: -5.1012063213105447,
    sin: [0.92535804620455153, 4.1880581192704264e-17],
    cos: [0.37909429740434636, -1.5637250731708073e-17],
    tan: [2.4409706306332382, -1.5484177097125008e-16]
  },
  {
    x: -12.446148538276907,
    sin: [0.11993268338742723, -3.4545973485927241e-18],
    cos: [0.9927820261545286, 1.8242386215222895e-17],
    tan: [0.12080464817839022, -2.8112034950441169e-18]
  },
  {
    x: -9.7398290349061547,
    sin: [0.30986503192779496, 1.0109003657872295e-17],
    cos: [-0.95078055406512529, 2.1843821531904646e-17],
    tan: [-0.32590594181059601, -2.4182621757558042e-17]
  },
  {
    x: 3.5126362872048311,
    sin: [-0.36258824301590165, -2.1461366218123686e-17],
    cos: [-0.93194944392206247, 1.3593726036230092e-17],
    tan: [0.38906428388429232, -3.7094672352684983e-18]
  },
  {
    x: 9.5109994838260157,
    sin: [-0.086114732121838122, -6.4916240934708491e-18],
    cos: [-0.99628522668540265, 3.95492504067113e-17],
    tan: [0.086435821605363033, -1.3650418025588384e-18]
  },
  {
    x: 0.092053130968226426,
    sin: [0.091923179725883208, -2.3043486487643147e-18],
    cos: [0.9957661015665692, -1.1648212764373028e-17],
    tan: [0.092314027944179755, 2.2976437814830237e-18]
  },
  {
    x: 7.4877627894523755,
    sin: [0.93368800172152833, 1.3347205098045456e-17],
    cos: [0.35808758068559049, 1.7223433731012442e-17],
    tan: [2.6074291656077535, -7.2677303176337216e-17]
  },
  {
    x: -3.4860619709619929,
    sin: [0.33769721725492663, 2.1040644122377589e-18],
    cos: [-0.94125479518474642, 2.4077138557396644e-17],
    tan: [-0.35877343624968683, 1.1771667430200291e-17]
  },
  {
    x: -7.2401312082888385,
    sin: [-0.81743616376079165, -5.0691712426344258e-17],
    cos: [0.57601919948560754, 1.0230260507978196e-17],
    tan: [-1.4191127040396789, 1.0945043448118055e-16]
  },
  {
    x: 4.5580623519949306,
    sin: [-0.98811526194574006, -1.6136751018390717e-17],
    cos: [-0.15371476542577642, 1.2417463116279774e-17],
    tan: [6.4282390778058796, 4.2183798625670925e-16]
  },
  {
    x: -2.5449785754814016,
    sin: [-0.56184472014877784, -1.5472375406744725e-17],
    cos: [-0.82724271555628792, -2.6254563492053627e-18],
    tan: [0.67917759755788187, -1.0138716750764698e-17]
  },
  {
    x: 6.0481249278565663,
    sin: [-0.23290170484550468, -1.1700426361462124e-17],
    cos: [0.97250028065808669, 1.693153876869688e-17],
    tan: [-0.23948754512225037, -1.2049673871428031e-18]
  },
  {
    x: -0.63438354831847121,
    sin: [-0.59268111387871958, -2.6031793499589188e-17],
    cos: [0.80543720875775304, -3.1669535123963713e-17],
    tan: [-0.73585017855436219, 5.1021154331308492e-17]
  },
  {
    x: -1.9581501493070324,
    sin: [-0.92591186648566826, -1.2277937552299143e-17],
    cos: [-0.37773961335955492, 2.5268717002473983e-17],
    tan: [2.451190803767596, -8.8301080604773141e-17]
  },
  {
    x: -8.1966622377844942,
    sin: [-0.94185733268488547, -2.9029662564927572e-17],
    cos: [-0.33601304270476307, 2.3166491007659541e-17],
    tan: [2.8030380163321396, 2.1233279384805575e-17]
  },
  {
    x: -4.9784661229982872,
    sin: [0.9648098274346848, -1.5234640497838139e-17],
    cos: [0.26294865826897418, 1.9850614846344907e-17],
    tan: [3.6691947157523277, 1.83030611094945e-16]
  },
  {
    x: 7.4714591821789078,
    sin: [0.92772605312966805, -3.1246609712355124e-17],
    cos: [0.37326179866743447, 7.814968597014559e-18],
    tan: [2.4854567395905556, -1.9386016937214157e-16]
  },
  {
    x: -4.6105901988877047,
    sin: [0.99482297714751744, -1.0251894652057616e-17],
    cos: [-0.10162304925237195, 5.5964737664789911e-18],
    tan: [-9.7893438985181565, -3.7058068907722549e-16]
  },
  {
    x: 9.3601571608683649,
    sin: [0.064575834853101671, -3.0633997036452054e-18],
    cos: [-0.99791280257997739, -8.298437963148525e-18],
    tan: [-0.064710899275116029, -3.5552003943892764e-18]
  },
  {
    x: -8.8187276317275192,
    sin: [-0.56962566021359351, 2.5148739121152901e-17],
    cos: [-0.8219042567271615, 3.3476723468351427e-17],
    tan: [0.69305598012334646, 2.8144516298690054e-17]
  },
  {
    x: 12.417295617058379,
    sin: [-0.1485234527561709, 1.1593236930722079e-17],
    cos: [0.98890888558116696, -5.0283764985639127e-17],
    tan: [-0.15018921856373643, 8.5379607566686825e-18]
  },
  {
    x: 8.0903114550842545,
    sin: [0.97220384199769516, 3.143879547105764e-17],
    cos: [-0.23413604934934842, 1.1301594039518486e-18],
    tan: [-4.1523030934339147, -1.266413704891584e-16]
  },
  {
    x: -9.420184587039758,
    sin: [-0.0045933575769770627, 1.6576829792523684e-19],
    cos: [-0.99998945047743881, 1.2077673864138577e-17],
    tan: [0.0045934060352176634, 3.7759549337921209e-19]
  },
  {
    x: 6.6287608150477979,
    sin: [0.33873821753850808, 1.6810786945516987e-17],
    cos: [0.94088066192202846, -2.7061322668933289e-17],
    tan: [0.36002251002431551, 6.0401131743106358e-19]
  },
  {
    x: -0.2365232319075492,
    sin: [-0.23432407968960967, 1.352812847772438e-17],
    cos: [0.97215853937391172, -2.4347547978409577e-18],
    tan: [-0.24103484174558476, -9.6676946813101205e-18]
  },
  {
    x: 4.1118552105613944,
    sin: [-0.82503410823746581, 2.0258022213359187e-17],
    cos: [-0.56508293218324124, 3.2671038952887617e-17],
    tan: [1.4600230536956467, -7.9535897440349993e-17]
  },
  {
    x: -9.4022431037405649,
    sin: [-0.022532949802880411, 1.414829311463817e-19],
    cos: [-0.99974610085420235, 2.8978265736241611e-17],
    tan: [0.022538672352538133, 1.348668698277902e-18]
  },
  {
    x: -7.2832403405446193,
    sin: [-0.84150071818763894, 7.0420078160527323e-18],
    cos: [0.54025599607009256, 1.334888812739382e-17],
    tan: [-1.5575962586419181, 1.0603013267095281e-16]
  },
  {
    x: -11.279161438439463,
    sin: [0.9600579277736252, 1.6300517589278662e-17],
    cos: [0.27980131400515729, 1.0655569365167332e-17],
    tan: [3.4312130777053085, 3.6681738481391075e-17]
  },
  {
    x: -11.650502068150672,
    sin: [0.7930919191568383, 3.4803255016823968e-17],
    cos: [0.6091019682845582, 5.0167821472272439e-17],
    tan: [1.302067569064765, 1.2993024466854211e-17]
  },
  {
    x: -2.2938361137936241,
    sin: [-0.74979786982029195, 3.2365594542011857e-17],
    cos: [-0.6616669512775688, 2.8121886509065478e-17],
    tan: [1.1331952855927849, 8.8540383687419724e-17]
  },
  {
    x: -1.0558476854054906,
    sin: [-0.87031801705578138, 3.4185895119938418e-18],
    cos: [0.49249015136151975, 9.6230053549043175e-18],
    tan: [-1.7671785205241828, -1.0361624774570337e-16]
  },
  {
    x: -0.31242694421182016,
    sin: [-0.30736899621356889, -7.7255730462185631e-18],
    cos: [0.95159040567182218, -2.1313072751652699e-17],
    tan: [-0.32300556455964541, 1.994816459896081e-17]
  },
  {
    x: 7.3883968876656994,
    sin: [0.89355919923232829, -3.221316336358644e-17],
    cos: [0.44894538361284025, -7.3487046284023766e-18],
    tan: [1.9903516816266282, -6.502001526160419e-17]
  },
  {
    x: 10.577737215718159,
    sin: [-0.91396876035652275, -4.0837785787617617e-17],
    cos: [-0.40578455501948446, -9.6320000735119456e-18],
    tan: [2.2523497975733378, 1.1687594590386676e-17]
  },
  {
    x: 7.7290976820954675,
    sin: [0.99221212881679466, -1.4324619725467833e-17],
    cos: [0.12455958987105133, -3.5326877743113541e-18],
    tan: [7.9657626509847148, 2.0491070774395324e-16]
  },
  {
    x: 5.1716710187230994,
    sin: [-0.89637100427506988, -3.2863134830810705e-17],
    cos: [0.44330466126006685, -2.1823067354606232e-17],
    tan: [-2.0220202551608395, -1.7184507528984408e-16]
  },
  {
    x: -12.495535678108235,
    sin: [0.070775714353806723, 1.5104119368700804e-18],
    cos: [0.99749225473569891, -4.733962503082921e-17],
    tan: [0.070953648028635422, 3.4506377632298295e-18]
  },
  {
    x: 5.2955659685431797,
    sin: [-0.83471736597492252, 4.2060597945533457e-17],
    cos: [0.55067859858531576, 1.3648127492178691e-18],
    tan: [-1.5157977232441893, -4.4272444728935264e-17]
  },
  {
    x: 3.6181334673047019,
    sin: [-0.45870813817374539, 1.2464610897763069e-17],
    cos: [-0.88858699291244192, -4.5700453207137683e-18],
    tan: [0.51622198145201159, 3.559660623497394e-17]
  },
  {
    x: -1.1050156444635721,
    sin: [-0.893471217507806, 3.8542117136928285e-17],
    cos: [0.44912045542940804, -1.0251499140888332e-17],
    tan: [-1.9893799240418704, 4.2848770225929038e-18]
  },
  {
    x: 6.8842883191003743,
    sin: [0.56555248475038955, -7.0981595864830909e-18],
    cos: [0.82471230559065889, 4.2055406697512392e-17],
    tan: [0.68575730096004917, 1.0127877424664824e-17]
  },
  {
    x: 1.8536569499825308,
    sin: [0.96026095777771181, 3.0840311027466029e-17],
    cos: [-0.27910373155483165, 1.653666227326484e-17],
    tan: [-3.4405163715593776, 1.6886707533853017e-16]
  },
  {
    x: 9.4689466194773324,
    sin: [-0.044154298887162782, -2.0571631839311169e-18],
    cos: [-0.99902472336263182, -3.2741243849258381e-17],
    tan: [0.04419740358230894, 1.310466043129318e-18]
  },
  {
    x: 7.745294846752472,
    sin: [0.99409940313032841, 1.1375445529069308e-17],
    cos: [0.10847293070588987, -3.3952912783887027e-18],
    tan: [9.1644928984697458, -8.2402110486054726e-16]
  },
  {
    x: -12.119663896207417,
    sin: [0.43199775462222734, -3.3267144419463193e-18],
    cos: [0.90187468087387501, -1.7683715321300641e-17],
    tan: [0.47899975881753487, -2.0052415404887568e-17]
  },
  {
    x: 8.0737923768159199,
    sin: [0.97593873337125736, 5.4462118638789911e-17],
    cos: [-0.21804492359535851, 9.9397785134038536e-18],
    tan: [-4.4758608330748233, 4.3159142632693008e-16]
  },
  {
    x: 8.063608404292129,
    sin: [0.97810865002449909, -2.9432718643898204e-17],
    cos: [-0.20809485516766629, 8.2345239677046441e-18],
    tan: [-4.7003019331564779, 3.0942847386091385e-16]
  },
  {
    x: 11.060266687257251,
    sin: [-0.99790817640572516, -3.6908783232943087e-17],
    cos: [0.064647285036574034, 6.1816933050229578e-18],
    tan: [-15.436196212124935, 2.0320412146131249e-16]
  },
  {
    x: -2.1949298813320599,
    sin: [-0.81146976991300845, -4.994124892573624e-17],
    cos: [-0.58439439808859306, -5.1190218308692607e-17],
    tan: [1.3885652781188897, 7.2335391370116682e-17]
  },
  {
    x: -1.931071246009763,
    sin: [-0.93579994135571554, 3.4922355194899683e-17],
    cos: [-0.35253151597926591, -1.9313505084001604e-17],
    tan: [2.6545142744365426, -8.5656716894674605e-17]
  },
  {
    x: 2.0346632304637211,
    sin: [0.89432909793717397, 5.3348257782148712e-17],
    cos: [-0.44740972785901806, -1.6416541428856104e-19],
    tan: [-1.9989040073330355, 9.3689428428777545e-17]
  },
  {
    x: -8.5939502425094858,
    sin: [-0.73848972525110801, -4.8456341529380268e-17],
    cos: [-0.67426472968600615, 4.4036601482624861e-18],
    tan: [1.0952518984568722, 1.0203919961381887e-16]
  },
  {
    x: 6.578022865135619,
    sin: [0.29058442139271823, 2.583871160356521e-17],
    cos: [0.95684935807255422, 2.9921322546665341e-17],
    tan: [0.3036887875203908, -9.8179403305720742e-18]
  },
  {
    x: -6.7819178022077145,
    sin: [-0.47831281352660315, -1.5688665338393631e-17],
    cos: [0.87818953103317332, 3.2858987396360271e-17],
    tan: [-0.54465784050497301, 1.218971337588741e-17]
  },
  {
    x: 7.7844782629468909,
    sin: [0.99758561287809766, 3.4352924994017202e-17],
    cos: [0.069447426004353843, -2.1405120092717788e-19],
    tan: [14.364616088371028, 1.014319872428968e-16]
  },
  {
    x: 12.277886977634296,
    sin: [-0.28449885108709644, -2.3329008422496495e-17],
    cos: [0.95867638112666675, 5.2068722072211667e-17],
    tan: [-0.29676213651236971, 8.0963293518078221e-18]
  },
  {
    x: -4.2110339624193145,
    sin: [0.87693212621829753, 6.4112922906936504e-18],
    cos: [-0.48061423824753247, 1.2524519476431379e-17],
    tan: [-1.8246070474646405, -6.7202347311674148e-17]
  },
  {
    x: -5.0307779397409575,
    sin: [0.94974096553033749, 7.5133689549011673e-18],
    cos: [0.31303689621752623, -4.311621634337872e-18],
    tan: [3.0339585429264284, 1.3979502920723315e-16]
  },
  {
    x: -12.226095247419337,
    sin: [0.33374668296114107, 2.5513344600195e-17],
    cos: [0.94266279846636336, -7.9665303176666652e-18],
    tan: [0.35404673177314322, -1.2304054968369672e-17]
  },
  {
    x: -7.1065882101551798,
    sin: [-0.73346312458434326, 1.2238765774210402e-17],
    cos: [0.67972924379856736, -3.9797616066932154e-17],
    tan: [-1.0790518890808523, -4.5753339305170346e-18]
  },
  {
    x: 10.23819203732711,
    sin: [-0.72663694912154608, -3.7050233498936796e-17],
    cos: [-0.68702164752744987, -1.6681581712585584e-17],
    tan: [1.0576623775053804, 3.8283840870200552e-17]
  },
  {
    x: 8.7579508419850924,
    sin: [0.61849589238446989, -2.6167576318326969e-17],
    cos: [-0.7857880319167112, 4.8655761160245745e-17],
    tan: [-0.78710271378888441, 5.8063747039168357e-18]
  },
  {
    x: 11.435838929080116,
    sin: [-0.90463891027338716, 7.8414630758937121e-18],
    cos: [0.42617888499945489, -1.5661166325826633e-17],
    tan: [-2.1226741683238113, -1.7327645493520644e-16]
  },
  {
    x: 7.0094639760975284,
    sin: [0.66409198323728313, -1.1687567119166442e-17],
    cos: [0.74765087962228205, -8.1923922471561356e-18],
    tan: [0.88823808188761388, 2.1769517011068736e-17]
  },
  {
    x: 12.251196661256934,
    sin: [-0.30998186051900462, -7.8819465465646019e-18],
    cos: [0.95074247099263232, 3.2850697131088881e-17],
    tan: [-0.32604187777092247, 1.8578985548755338e-17]
  },
  {
    x: -10.867513391941952,
    sin: [0.99181140349256591, 1.420065494177806e-17],
    cos: [-0.12771115809555006, -1.1929726158305963e-17],
    tan: [-7.7660512854367756, -2.249306014860845e-16]
  },
  {
    x: 7.3789120418234759,
    sin: [0.88926089230346406, 5.2987055585880671e-17],
    cos: [0.45740033386481782, -2.0937936837723301e-18],
    tan: [1.9441631902399974, -4.0711220295635592e-17]
  },
  {
    x: 2.375133548104758,
    sin: [0.69358883394282711, -3.7735384976045108e-17],
    cos: [-0.72037110535461479, 5.118759384858157e-17],
    tan: [-0.96282156347927972, 3.3144082266169363e-17]
  },
  {
    x: 5.8508701203791667,
    sin: [-0.41897410882291314, 9.497335360233569e-18],
    cos: [0.90799818068983251, 8.2230792333839688e-18],
    tan: [-0.46142615451564711, -1.1076927314642472e-18]
  },
  {
    x: 4.906737547252348,
    sin: [-0.98117368732026167, 1.420534569362542e-17],
    cos: [0.19312740693739305, 7.2094475510205253e-18],
    tan: [-5.080447684146316, 4.1984748112493899e-16]
  },
  {
    x: 4.5193642677917651,
    sin: [-0.98142849999128257, -1.7914849741493729e-17],
    cos: [-0.1918283071000238, -2.2424309789699116e-18],
    tan: [5.1161818337871408, 1.2239979815727143e-16]
  },
  {
    x: -2.7062817832740453,
    sin: [-0.42169229997587432, 1.0049342706460518e-17],
    cos: [-0.90673899449679407, -4.8922475328557251e-17],
    tan: [0.46506470167845554, 1.3994103600105801e-17]
  },
  {
    x: 1.5471072694895369,
    sin: [0.99971942740313713, -2.0676795114294616e-17],
    cos: [0.023686841763807892, -4.1181237004761653e-19],
    tan: [42.205686911399475, -3.4183700284851295e-15]
  },
  {
    x: -7.3370499785099659,
    sin: [-0.86933969159912894, 5.8686871633006743e-18],
    cos: [0.4942150347878253, 2.2375481098404116e-17],
    tan: [-1.7590312524028144, -9.2427047576761226e-17]
  },
  {
    x: 0.68791978626290984,
    sin: [0.63493144958424264, 7.3472520749572918e-18],
    cos: [0.77256847873107815, -9.338414070472582e-19],
    tan: [0.82184488115163534, 1.060065879599512e-17]
  },
  {
    x: -2.4075025260884146,
    sin: [-0.66991190675109025, 4.9387315818031844e-17],
    cos: [-0.74244059506004834, 2.5672079661806148e-17],
    tan: [0.90231044908974567, -5.1799917543134043e-18]
  },
  {
    x: -3.7004842963257953,
    sin: [0.53024681048704225, -3.2199646972518763e-17],
    cos: [-0.84784333456619143, 5.0332581713427463e-17],
    tan: [-0.62540659207794447, 3.1458893594125867e-17]
  },
  {
    x: 2.3329185186863413,
    sin: [0.72337235611288075, -9.7732065918506578e-18],
    cos: [-0.69045813371391296, 4.5215270173156028e-17],
    tan: [-1.0476701204487593, -8.0488750201989874e-17]
  },
  {
    x: -3.6104399053947844,
    sin: [0.45185823096769617, -1.3556594207434626e-17],
    cos: [-0.89208975955715586, 1.0415780018627035e-18],
    tan: [-0.50651655410998553, -4.9712792164761418e-17]
  },
  {
    x: 11.685879510190055,
    sin: [-0.77105169352499203, -5.6903702002281621e-18],
    cos: [0.63677255430195934, -9.9198566657555516e-19],
    tan: [-1.2108745710157558, 5.675454457842173e-17]
  },
  {
    x: -8.6849098331891099,
    sin: [-0.67419052212964659, -3.6575533837914737e-17],
    cos: [-0.73855747228672353, -5.3146995164321505e-17],
    tan: [0.91284774364575338, -4.5651858258758797e-17]
  },
  {
    x: -2.6412447475512977,
    sin: [-0.47973082585610338, -1.4702724361560873e-17],
    cos: [-0.87741571374316119, -1.3926927647135585e-17],
    tan: [0.54675431308326339, 3.6528649371712449e-17]
  },
  {
    x: -2.8325628514257968,
    sin: [-0.30413454104636578, 1.2313022123384045e-17],
    cos: [-0.95262908886014841, 4.1564941374247178e-17],
    tan: [0.31925808754199664, 2.762337541056295e-17]
  },
  {
    x: 5.7039942890013613,
    sin: [-0.54734707445974995, 4.6969929160146586e-17],
    cos: [0.83690571755745158, 4.8454084844249245e-17],
    tan: [-0.65401282722408427, -2.6606885511731511e-17]
  },
  {
    x: -2.8005461936860172,
    sin: [-0.33447346432010111, 3.6278074323970057e-18],
    cos: [-0.94240516852663225, 4.5805983259550089e-17],
    tan: [0.35491471767182797, -2.5459564777948493e-17]
  },

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // random cases (medium)
  {
    x: 5.9403303163526955,
    sin: [-0.3361772852852859, 7.8829191572651097e-18],
    cos: [0.94179872205170012, 1.3213334346103002e-18],
    tan: [-0.35695236934801383, -1.0044082808795531e-17]
  },
  {
    x: -166439.59407579058,
    sin: [0.91555321473149953, -3.9998160463273951e-17],
    cos: [-0.40219685602303851, -1.9805930242399886e-17],
    tan: [-2.2763808344614582, -1.9806397967261812e-16]
  },
  {
    x: 1811811.6831091738,
    sin: [-0.97547830019807691, 1.8794885714714086e-17],
    cos: [0.22009562885861814, 8.7633943477072432e-18],
    tan: [-4.4320657582195357, 3.2923966691781494e-16]
  },
  {
    x: 27919.818740159695,
    sin: [-0.46605592940804041, 2.6725966788580033e-17],
    cos: [-0.88475526031982865, 5.009768201361207e-17],
    tan: [0.52676254136038325, 2.6541196300275738e-17]
  },
  {
    x: 3731.6940495414633,
    sin: [-0.4951634226940333, -1.2107230684871166e-17],
    cos: [0.86879985314566555, 4.7151865194184567e-17],
    tan: [-0.56993957918062943, -1.2895257586215731e-17]
  },
  {
    x: 12778779.355005458,
    sin: [-0.58253840028711368, 6.2322608987837819e-18],
    cos: [0.81280318170571308, 4.9329537401702282e-17],
    tan: [-0.71670290348104215, 1.9142468621826328e-17]
  },
  {
    x: 949.86430402997757,
    sin: [0.89270957711409182, 7.1155892519239658e-18],
    cos: [0.45063245658605122, -8.9795040148934322e-18],
    tan: [1.9810148249799293, -1.6396529913856067e-17]
  },
  {
    x: -63247.948326172031,
    sin: [-0.98629122157204774, 4.0863380982268998e-17],
    cos: [0.16501401834364834, 7.7918626590337822e-18],
    tan: [-5.9770147498502606, -1.7071971961649406e-16]
  },
  {
    x: 14390063.087368999,
    sin: [-0.88157744302059793, -2.2152011438162463e-17],
    cos: [-0.47203941780031927, 9.9652287472391723e-19],
    tan: [1.8675928530051706, -9.841872063844807e-17]
  },
  {
    x: 0.881951454890186,
    sin: [0.77198078227168299, -4.603923476702627e-17],
    cos: [0.63564586980739557, -1.5009125290842249e-17],
    tan: [1.2144824955845268, -5.6019279666306638e-17]
  },
  {
    x: -4453818.0980778346,
    sin: [-0.8637373930433957, 4.1610763167356806e-17],
    cos: [0.50394217511396944, 1.5137198655288734e-17],
    tan: [-1.71396131480374, 5.6024724608164908e-17]
  },
  {
    x: 6290101.3601710238,
    sin: [-0.98670665249219824, 3.7618824662490802e-17],
    cos: [-0.16251148244859626, 5.9212877821043967e-18],
    tan: [6.0716119108955997, 9.1356487622485235e-17]
  },
  {
    x: 2218966.656888776,
    sin: [-0.075326469621576825, 1.3709550469147623e-19],
    cos: [-0.9971589256354022, -4.0010685483749409e-17],
    tan: [0.075541087468657869, -4.0085590181136527e-18]
  },
  {
    x: -611290.22922829899,
    sin: [0.76388201972018632, -2.101020209589972e-17],
    cos: [0.6453559172644262, -1.0898004163984836e-17],
    tan: [1.1836600537547959, -1.6049715795972704e-17]
  },
  {
    x: -3053244.7806468499,
    sin: [0.0043386775716203144, 1.2295198254096499e-19],
    cos: [0.99999058789417095, -5.4481454557291041e-17],
    tan: [0.0043387184080971343, -2.8832206935491833e-20]
  },
  {
    x: -5905.3552561717734,
    sin: [0.74393023073943687, 2.9204118715318879e-17],
    cos: [0.66825729460438232, -4.1369293953199413e-17],
    tan: [1.1132392219973506, 8.4437689199456244e-17]
  },
  {
    x: -229.33432015959397,
    sin: [-0.0019435512373402694, -4.411238657633074e-20],
    cos: [-0.99999811130251037, 4.5493992389224734e-17],
    tan: [0.0019435549081275455, -7.5498174770820385e-20]
  },
  {
    x: 39065.093674172902,
    sin: [0.57366488338933475, -2.4302974875879697e-17],
    cos: [-0.81909010588939546, 4.2206617776485558e-17],
    tan: [-0.70036846894448834, -2.3288249584888412e-17]
  },
  {
    x: 35193.783773451461,
    sin: [0.99576440257945265, -2.0859140891946369e-17],
    cos: [-0.091941582298684654, 5.9929589112067733e-19],
    tan: [-10.830403150389314, 2.68122710346816e-16]
  },
  {
    x: 23.234570017757814,
    sin: [-0.94688973333893256, 1.5576835835041391e-17],
    cos: [-0.32155844398386618, -1.9740726959114722e-17],
    tan: [2.9446893746831342, -1.6909220025053286e-16]
  },
  {
    x: -5332997.483764438,
    sin: [0.53031010768535203, 2.8586876132902881e-17],
    cos: [0.84780374479401199, 5.1935584024418319e-17],
    tan: [0.62551045680294759, -2.0405194562195495e-17]
  },
  {
    x: -189178.56294181742,
    sin: [0.95747531635966932, -3.3246396436313655e-17],
    cos: [-0.2885151964142465, 1.9025102461584827e-17],
    tan: [-3.3186304508721207, -5.7784019182275527e-17]
  },
  {
    x: -1008029.3167562585,
    sin: [0.81436284818084426, -2.3926042020601921e-17],
    cos: [0.58035605579918204, -3.8911273200735428e-17],
    tan: [1.4032124590470967, 1.3047574814405419e-17]
  },
  {
    x: 5.2730795538067428,
    sin: [-0.84688808594769005, 3.9013247619409535e-17],
    cos: [0.53177116307661698, 4.197153212363089e-17],
    tan: [-1.5925799380469063, 1.0679134633186315e-16]
  },
  {
    x: 7.6678110494935012,
    sin: [0.98272025227894699, 5.4052720928393687e-17],
    cos: [0.18509701715803709, -1.1190316535036189e-17],
    tan: [5.30921711958164, 2.8207342094729528e-16]
  },
  {
    x: -25.435305644988471,
    sin: [-0.29796911270832427, -2.1920331930035004e-17],
    cos: [0.95457551187520728, -3.4109910298578255e-17],
    tan: [-0.3121482889530463, -1.471180720634439e-17]
  },
  {
    x: 773744.48305376631,
    sin: [0.9983413017202879, 1.8286576110294358e-17],
    cos: [-0.057572956146449916, -5.1529050126019324e-19],
    tan: [-17.340455806729459, 4.1016221609962678e-16]
  },
  {
    x: 396.75330088435379,
    sin: [0.79111303745029593, 4.661782534669403e-17],
    cos: [0.61166997799153633, 4.716928108091936e-17],
    tan: [1.2933658114919653, -1.6001098617341718e-17]
  },
  {
    x: 1756017.4444245645,
    sin: [-0.78459378422619896, -5.1256658205869734e-17],
    cos: [0.62001015616972976, -2.5593768089754622e-17],
    tan: [-1.2654531162412346, -8.1907574749209558e-18]
  },
  {
    x: -10167153.402589491,
    sin: [0.9836672760527061, -2.7124847347645367e-17],
    cos: [-0.17999636113835565, -8.3316314833687803e-18],
    tan: [-5.4649286787336901, 3.9778480597323279e-16]
  },
  {
    x: 97.731018409968783,
    sin: [-0.33503855395056042, -4.4920472788547879e-18],
    cos: [-0.94220441909742569, -4.7407571498821272e-18],
    tan: [0.355590089750913, -1.9276438390905643e-17]
  },
  {
    x: -250.41306553397791,
    sin: [0.79216407405884048, -2.0091480053881146e-17],
    cos: [0.61030818425652777, 5.254567073631853e-17],
    tan: [1.2979738671272252, -7.8312014493027536e-17]
  },
  {
    x: 1.4763011778886039,
    sin: [0.99553865463585989, 5.4110189781200522e-18],
    cos: [0.094354581901580595, -4.081237435782579e-18],
    tan: [10.551036680701809, -6.4457896584463133e-17]
  },
  {
    x: 1495.3237495567591,
    sin: [-0.074285060926664745, 3.6960368440962128e-18],
    cos: [0.99723704790943346, 1.0145374446965272e-17],
    tan: [-0.074490875647262478, 1.3394558648656269e-18]
  },
  {
    x: 7653.8999436739687,
    sin: [0.83063076984913198, 4.026606459694048e-17],
    cos: [0.55682360239113271, 1.9950147986226684e-17],
    tan: [1.4917305341982745, -1.8839253864090836e-17]
  },
  {
    x: -4331.4815250506163,
    sin: [-0.69953333907737936, 4.5542017587314277e-17],
    cos: [-0.7145999632796326, -2.2467865675726148e-18],
    tan: [0.97891600199207185, 1.8328954473642891e-17]
  },
  {
    x: -42787364.277565323,
    sin: [0.1666537483247984, -1.0576419054164455e-17],
    cos: [-0.98601548069454503, -2.5563393931927535e-17],
    tan: [-0.16901737506941392, -1.1644856064196485e-17]
  },
  {
    x: 67480.231162792188,
    sin: [-0.92423849218958565, 2.039993657799233e-17],
    cos: [0.38181567484209089, -1.4557658916502239e-17],
    tan: [-2.4206405160600775, -8.6228754166114686e-17]
  },
  {
    x: 37397.946933095707,
    sin: [0.4150381755909387, 2.1382335957835694e-18],
    cos: [0.90980399691479985, 4.1217624551933896e-19],
    tan: [0.45618416384007782, -1.0302867300125348e-17]
  },
  {
    x: 41.148619342547263,
    sin: [-0.30307221243845095, -1.0719269749076159e-17],
    cos: [-0.95296759338797166, 1.548224668322837e-17],
    tan: [0.31802992519501588, 2.7743232214444936e-17]
  },
  {
    x: 3.2820941665700518,
    sin: [-0.14003970325016779, -4.2086253745343061e-18],
    cos: [-0.99014588900505207, -2.4028022480617128e-17],
    tan: [0.14143340370870666, 5.1007734835296664e-18]
  },
  {
    x: 4849806.8006724771,
    sin: [-0.98804713373833786, 3.8927219570138001e-17],
    cos: [-0.15415207267972489, 9.5102207643428278e-18],
    tan: [6.4095611337718488, -7.7708408443383041e-17]
  },
  {
    x: 10754.986253734003,
    sin: [-0.96736096108402692, 3.3470621425574618e-17],
    cos: [-0.25340238943346177, -1.8646923236688262e-17],
    tan: [3.8174895005796139, 7.8268387771061711e-18]
  },
  {
    x: 23.514227500597219,
    sin: [-0.9988617408099022, -3.9094738401517646e-17],
    cos: [-0.047699295028455949, 2.1090346409149205e-18],
    tan: [20.940807200903322, -1.4742344726104033e-15]
  },
  {
    x: 1199645.2290091834,
    sin: [0.19876533863342569, -3.3287085788847674e-18],
    cos: [-0.98004711119309951, -3.3769397770951795e-17],
    tan: [-0.20281202440508267, -1.0993506832895424e-17]
  },
  {
    x: -8394782.6540840138,
    sin: [-0.82912194273887718, -1.6611389092257731e-17],
    cos: [0.55906779917010962, 9.8354329943631344e-18],
    tan: [-1.4830436379445227, -4.2619398389140121e-17]
  },
  {
    x: -21592.859342739885,
    sin: [0.6388746841779368, -5.3388725784734514e-17],
    cos: [-0.76931082009584495, -4.0359449995180218e-17],
    tan: [-0.83045066764866537, 2.362983004790186e-17]
  },
  {
    x: -2417.1694765027346,
    sin: [0.95936014224315802, -2.1238606849249502e-17],
    cos: [-0.28218454506791768, 2.4874676825309951e-17],
    tan: [-3.399761464655175, -7.8256931090940878e-17]
  },
  {
    x: -3.4292827879951191,
    sin: [0.28373804966803601, -2.1009956963517164e-17],
    cos: [-0.95890182978789817, 5.1717579706465933e-17],
    tan: [-0.29589895529847587, 1.5721242929857736e-18]
  },
  {
    x: -1.5608062967591971,
    sin: [-0.999950100064949, -2.0738130808599986e-17],
    cos: [0.0099898638678633852, 6.0670146821210878e-19],
    tan: [-100.09646911022588, 3.4520280225545657e-15]
  },

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // random cases (large)
  {
    x: -1241746184393206.2,
    sin: [0.5205657185392788, 5.2737166132504246e-17],
    cos: [0.85382160471710034, -1.3526005931812368e-17],
    tan: [0.60968909156586604, -4.1311943785628043e-18]
  },
  {
    x: 1567046456813880,
    sin: [0.96317970187960833, 1.138752628692708e-17],
    cos: [-0.26885844209752613, 1.9028876320779728e-17],
    tan: [-3.5824789222360485, 1.4869880921127182e-16]
  },
  {
    x: -96987576963471.516,
    sin: [-0.72075294608136087, 3.0058731311661857e-17],
    cos: [0.69319203018719056, 3.9353050980282947e-17],
    tan: [-1.0397594240757899, 4.8964239057271072e-17]
  },
  {
    x: -17814829907177.684,
    sin: [0.8419604363142148, 5.3110333737830326e-17],
    cos: [-0.53953926982340861, -3.4832602057727966e-17],
    tan: [-1.5605174329382712, 6.2976596964805724e-17]
  },
  {
    x: -17401779220896.072,
    sin: [-0.36148556511588664, 1.2161644934322149e-17],
    cos: [-0.93237770576781176, 3.822762808915759e-17],
    tan: [0.38770292648536009, 2.4797840366458309e-17]
  },
  {
    x: 892635447.17089677,
    sin: [-0.95799613580818477, -2.7580848054875003e-17],
    cos: [0.28678110777487759, 4.680047919864173e-19],
    tan: [-3.3405134084362671, -3.8271249008652361e-17]
  },
  {
    x: -3435812368290.0244,
    sin: [0.72454189444103267, -2.1831558978747126e-17],
    cos: [-0.68923076193666766, -3.6511088239221422e-17],
    tan: [-1.0512326704704014, -1.5737591696641917e-17]
  },
  {
    x: -272616009.22791713,
    sin: [-0.39940271298550573, -3.3704556985150939e-18],
    cos: [-0.91677558478605747, -4.2451571680179668e-17],
    tan: [0.43566028547620189, -2.2031101521523396e-17]
  },
  {
    x: 310891146.03723466,
    sin: [-0.82824497001518371, 3.0331843281934812e-18],
    cos: [-0.56036619245324515, -5.1548027858815612e-17],
    tan: [1.4780423608162072, 9.9739939916485237e-17]
  },
  {
    x: 27132616345.197037,
    sin: [0.79374741532631676, -2.8981165899820655e-17],
    cos: [-0.60824751595283288, 3.931256363662033e-17],
    tan: [-1.3049743640677172, -6.8671892305665799e-17]
  },
  {
    x: -350861304727.2486,
    sin: [-0.08408447645644089, -2.6837439082243501e-18],
    cos: [0.99645862975792743, -2.7750365161657019e-17],
    tan: [-0.084383308995846396, -5.0154152785114933e-18]
  },
  {
    x: 2539425980.506598,
    sin: [0.51654943047292423, -2.5575879669506477e-17],
    cos: [-0.85625737128394852, 1.5716290180712002e-17],
    tan: [-0.60326421447136158, -1.3166489227246475e-17]
  },
  {
    x: -298798317.31220919,
    sin: [-0.92454833356649402, -1.0977332597055127e-17],
    cos: [0.38106479619537004, -1.6726434191062252e-17],
    tan: [-2.4262234213114842, 1.4296102780518935e-16]
  },
  {
    x: -298472471225.86542,
    sin: [-0.30914483587388353, 2.719669077536615e-17],
    cos: [-0.95101496857436985, 1.6765445127690246e-17],
    tan: [0.32506831762838678, -2.654489646084627e-17]
  },
  {
    x: 38018586806.492981,
    sin: [-0.69217286584969506, -4.9879519064981377e-17],
    cos: [-0.72173175334151674, -1.417508995476498e-17],
    tan: [0.95904449630355304, -3.0717053696735363e-18]
  },
  {
    x: 13458312849760.684,
    sin: [-0.51087480537768737, -5.9225279172545185e-18],
    cos: [-0.85965512458794202, 4.1529241832646749e-17],
    tan: [0.59427878781338583, 4.6574499925910777e-17]
  },
  {
    x: -4550128064004772,
    sin: [-0.65837937067990482, 2.4753674345789081e-18],
    cos: [-0.75268625885101192, 2.3864246180263982e-17],
    tan: [0.87470624438518629, 1.4074783415086861e-17]
  },
  {
    x: 82993826653.802628,
    sin: [0.39474476202911102, -2.1438615560751621e-17],
    cos: [0.91879082105263787, 5.3004416084342234e-17],
    tan: [0.42963507360343545, 1.5959691228789717e-17]
  },
  {
    x: -2104791263429142.2,
    sin: [0.68093812886454474, -1.3959155271086948e-17],
    cos: [-0.73234094836930475, 3.0514487744771146e-18],
    tan: [-0.92981026171045322, 3.0923051467584217e-17]
  },
  {
    x: -29531605174273.273,
    sin: [0.97636201285322244, 1.6984550452792695e-17],
    cos: [0.21614166617569106, -4.7766610581452055e-18],
    tan: [4.5172318235928897, -1.1727413391459723e-16]
  },
  {
    x: 84016561.365937933,
    sin: [0.26673597472836047, -2.1203374284766577e-17],
    cos: [0.96376964041502755, -2.6289472677006151e-17],
    tan: [0.27676320517161768, -5.9543541836869472e-18]
  },
  {
    x: 1833642124027484.5,
    sin: [0.66273233982616697, -4.1803660002635402e-17],
    cos: [-0.74885635855518651, 4.1413250779001288e-17],
    tan: [-0.88499260539740388, -5.4277560634089497e-18]
  },
  {
    x: -2391790397752.0088,
    sin: [0.23241485864109487, -1.2344518509487858e-17],
    cos: [0.9726167454258845, 3.9897955756937828e-17],
    tan: [0.23895831501371714, 1.1749377648922754e-17]
  },
  {
    x: -2245074181.4964924,
    sin: [0.55247229472030213, -3.3840256892299043e-17],
    cos: [-0.83353126130126853, -3.7555702982121849e-17],
    tan: [-0.66280932746038723, 2.8388093802349409e-17]
  },
  {
    x: 134315720.98815763,
    sin: [-0.42454452853471991, 1.6924322520703196e-17],
    cos: [0.90540705944411126, -1.0459453775122845e-17],
    tan: [-0.4688990704306808, 2.5085576693979037e-17]
  },
  {
    x: 182804661.85328111,
    sin: [-0.33395764107025827, 7.0441170251592213e-18],
    cos: [-0.94258808287119167, -3.1324177957240238e-17],
    tan: [0.35429860311091466, -1.8246048286040149e-17]
  },
  {
    x: 311947275611097.88,
    sin: [0.43766676290981193, -1.3579030119724078e-17],
    cos: [0.89913725573131853, -9.2523065561031501e-18],
    tan: [0.48676301656951487, -7.6927313331909504e-18]
  },
  {
    x: -10729559336516.684,
    sin: [-0.44245514498235705, -1.5984088153207469e-17],
    cos: [-0.89679063592270036, -4.0386513011976639e-17],
    tan: [0.49337618755030671, 1.1772161835332375e-17]
  },
  {
    x: 33555630440718.051,
    sin: [0.81698269883822061, 7.2730301958330008e-18],
    cos: [0.57666217996242597, -3.8601062293348408e-17],
    tan: [1.4167440266178952, -5.2706116395620433e-17]
  },
  {
    x: -29656600372053.562,
    sin: [-0.99444615909325418, 7.644917550991653e-18],
    cos: [-0.10524655179469879, -4.115283222881878e-18],
    tan: [9.4487291235259629, 2.841637485590456e-17]
  },
  {
    x: -1583310983.1976004,
    sin: [-0.43944855770734065, -3.4953898325073148e-18],
    cos: [-0.8982677580370666, -3.7446632140713775e-17],
    tan: [0.48921777919274601, -1.1297774222170643e-17]
  },
  {
    x: 107609024.45454133,
    sin: [0.85505022031977418, 2.2088204641423573e-17],
    cos: [0.51854519642081887, -2.0091310796386729e-17],
    tan: [1.6489405865132514, 7.2854389820354026e-17]
  },
  {
    x: -44834983653.792534,
    sin: [0.33632281477442311, -8.8011543606423844e-18],
    cos: [0.94174676227859111, -5.4466095551315061e-17],
    tan: [0.35712659522256029, -4.197780980616546e-18]
  },
  {
    x: 27453015623.060349,
    sin: [0.92764084955686743, 3.8388327125443153e-17],
    cos: [0.37347349870293767, -1.1088100317936685e-17],
    tan: [2.483819742976507, 1.2124515614761188e-16]
  },
  {
    x: -63503838873.035004,
    sin: [0.28033730833248233, -2.5552290321731461e-17],
    cos: [0.9599015540965119, -6.1445167840831004e-18],
    tan: [0.29204797839539304, -5.6153553767044228e-18]
  },
  {
    x: -399569486024.61206,
    sin: [0.031418136182975114, 1.4804268320070764e-18],
    cos: [-0.99950632850362087, 2.0357313691980136e-17],
    tan: [-0.03143365408202245, -2.0043208157456327e-18]
  },
  {
    x: -6592352684103.5498,
    sin: [-0.9584118958205079, -1.9006356152187259e-17],
    cos: [0.28538857361453679, -6.8666207867822856e-18],
    tan: [-3.3582700375208345, -1.0597851323085811e-16]
  },
  {
    x: -17060851394.559805,
    sin: [0.95018108854254224, 3.7662125379842958e-17],
    cos: [0.31169841028806905, 3.0208190203285793e-18],
    tan: [3.0483988919429934, 1.3237906029789514e-16]
  },
  {
    x: 9820918509.4439831,
    sin: [0.12097664222554647, 5.2043534442966882e-18],
    cos: [-0.99265535410626382, -5.5004385243345913e-17],
    tan: [-0.12187174705209509, 5.8936323226519462e-18]
  },
  {
    x: 21181686420700.32,
    sin: [-0.41617491528323819, 1.2823981768377883e-17],
    cos: [0.90928457585565015, -3.1289825554616973e-17],
    tan: [-0.45769490249145761, -6.0270550403246286e-18]
  },
  {
    x: 646413548.39929092,
    sin: [-0.058521292981234645, 2.8391383741026146e-18],
    cos: [-0.99828616051100527, 4.202780240353583e-17],
    tan: [0.058621761270614643, 2.2664509550043422e-18]
  },
  {
    x: -1529977592924.9036,
    sin: [0.85087995383494774, -5.0371929449001331e-17],
    cos: [0.52536016613542114, -1.5070845800331888e-17],
    tan: [1.6196126175573387, -2.0981859066934571e-17]
  },
  {
    x: 374174233.1889267,
    sin: [-0.96914753722154223, -3.6511798149103482e-17],
    cos: [0.24648134026213697, -3.6820977150674917e-18],
    tan: [-3.9319306532122793, 7.8199885840058461e-17]
  },
  {
    x: -1136388349821802.2,
    sin: [0.97420637103468211, -3.732685357792648e-17],
    cos: [0.22565891658748027, -1.166815058556626e-17],
    tan: [4.3171632026205158, -2.31883677388082e-16]
  },
  {
    x: -86609083166.021118,
    sin: [0.18319123160665984, 6.8415747200761503e-18],
    cos: [-0.98307729739956617, -1.5392548987363824e-17],
    tan: [-0.18634468733154236, -9.550845213554378e-18]
  },
  {
    x: -123869994898614.48,
    sin: [-0.79470576012063321, 5.2819313731307061e-17],
    cos: [-0.60699485568749811, -8.8088947558654474e-18],
    tan: [1.3092462854903915, 4.1249274240156147e-17]
  },
  {
    x: -460336614142.61005,
    sin: [0.1073387747272691, -5.7560162437357297e-18],
    cos: [0.99422250398995127, -4.369944660390466e-17],
    tan: [0.10796252780087343, -1.1985608983125779e-18]
  },
  {
    x: 6374246.9058757424,
    sin: [-0.56955207181224821, -4.7973077283686717e-17],
    cos: [0.82195525273239511, 4.9857377394699077e-17],
    tan: [-0.69292345285087908, -3.8768014427184079e-17]
  },
  {
    x: -26518341.319669176,
    sin: [-0.60604984137344242, -4.7544492676195673e-17],
    cos: [0.79542667152367053, -1.6379684715937966e-17],
    tan: [-0.76191792791223678, -4.6823903820301825e-17]
  },
  {
    x: 203238425505785.94,
    sin: [-0.99179174581273233, 2.6935508991868533e-17],
    cos: [0.12786372799872761, 1.8719166701228879e-18],
    tan: [-7.7566309174295442, -2.6648265857680594e-16]
  },

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // random cases (huge)
  {
    x: -6.9812147580734842e121,
    sin: [-0.014082438753355549, -7.4920086861391616e-19],
    cos: [-0.99990083754278258, 4.924190206805686e-17],
    tan: [0.014083835341075017, 3.599992208397054e-19]
  },
  {
    x: -1.0896160053995462e65,
    sin: [-0.5902357969902251, 5.4268184524228403e-17],
    cos: [0.80723088639577822, 2.064483766536541e-17],
    tan: [-0.73118584402237252, -3.0067050825304482e-17]
  },
  {
    x: 4.8380359426261792e59,
    sin: [-0.12523982824648722, 7.4579578043067102e-18],
    cos: [-0.992126496683155, -6.2940017767975881e-18],
    tan: [0.12623372993785059, -5.1892068619265901e-19]
  },
  {
    x: -2.9625651467474103e229,
    sin: [0.95576232455720922, -1.0088124676125801e-17],
    cos: [0.29414006690180766, -2.867949882468258e-18],
    tan: [3.249344214218425, 1.3547424415835894e-16]
  },
  {
    x: 1.6682738559666085e294,
    sin: [0.15345778119419984, 3.2096173153122764e-19],
    cos: [0.9881552051125132, 2.4886522448454432e-17],
    tan: [0.15529724521030766, 9.9986638548705025e-18]
  },
  {
    x: 9.8116566475314424e284,
    sin: [-0.531561126511372, -2.5473610245906567e-17],
    cos: [-0.84701993411132959, -2.088214750520208e-17],
    tan: [0.62756625328903448, 5.5180133870686041e-17]
  },
  {
    x: -1.985714840014429e113,
    sin: [-0.61983499113268781, 6.2793952152343794e-18],
    cos: [0.7847321732715824, 7.4799964610710082e-18],
    tan: [-0.78986820248310818, -1.4525262288977675e-17]
  },
  {
    x: 1.0404586563059071e38,
    sin: [0.72924967584151901, 4.1181018111444769e-17],
    cos: [-0.68424769658730999, 3.5591897543612742e-17],
    tan: [-1.0657685505974763, 5.2540344286439522e-17]
  },
  {
    x: -2.9389646487459987e264,
    sin: [0.98706956244141419, 1.3234533375362736e-17],
    cos: [0.16029247924252435, -2.7167033068247763e-18],
    tan: [6.1579281018416756, 4.3276211002492147e-16]
  },
  {
    x: -2.1520200272639208e100,
    sin: [-0.11957582844065447, 5.427598648132546e-18],
    cos: [-0.99282507082201099, -1.5947667238644142e-17],
    tan: [0.12043997674399123, 5.5638686303963026e-18]
  },
  {
    x: -2.719910209442524e189,
    sin: [-0.48517261648495036, -4.4442332214086919e-18],
    cos: [-0.87441839654318076, 2.9332140816270478e-17],
    tan: [0.55485179452190481, -3.4809865822804134e-17]
  },
  {
    x: 2.8153755040361263e169,
    sin: [-0.21185993453410296, 7.2805752518489957e-18],
    cos: [0.97730003997708181, -5.0301191813234872e-17],
    tan: [-0.21678085118984666, 7.684648724944775e-18]
  },
  {
    x: 2.4769993502700055e127,
    sin: [0.41767719144661591, -1.9423393366787694e-17],
    cos: [-0.90859548961309888, -5.1300173429952835e-17],
    tan: [-0.45969542686644038, 2.018706559369917e-17]
  },
  {
    x: -9.0745162325455896e90,
    sin: [0.11949964385695447, 1.2391780228376433e-18],
    cos: [-0.99283424352610894, -2.6950682714705249e-17],
    tan: [-0.12036212956610409, 1.0558629393175172e-18]
  },
  {
    x: -3.8824523727808551e53,
    sin: [0.27485296859999342, -1.2554470094769205e-17],
    cos: [-0.96148626909164492, -8.4163448548910672e-18],
    tan: [-0.28586260400749991, -1.3438051415004414e-17]
  },
  {
    x: -1.6047008662124506e97,
    sin: [-0.9997983509615167, 9.0601963905820526e-18],
    cos: [-0.020081270244481374, 4.6348503444340612e-19],
    tan: [49.787605006524714, 3.3803527842630494e-15]
  },
  {
    x: 1.8835766625928278e53,
    sin: [-0.95078497573274712, -3.836028407574243e-17],
    cos: [-0.30985146428713128, -1.3819184465116315e-17],
    tan: [3.0685185817023588, -1.7826425760770669e-16]
  },
  {
    x: -8.5062054885353102e160,
    sin: [0.66232298929993805, 1.0558699017409042e-18],
    cos: [-0.74921843133013899, 2.9134748354423899e-17],
    tan: [-0.88401854733347995, 7.3666656457597024e-19]
  },
  {
    x: -1.0585122415396046e204,
    sin: [-0.61452035508918179, 2.0162026322105094e-17],
    cos: [0.78890096538226262, 1.4600039060191012e-17],
    tan: [-0.77895753973556792, -4.4978326366735321e-17]
  },
  {
    x: -4.5265889828658531e70,
    sin: [0.3925693154261729, 1.6344827908946141e-17],
    cos: [0.91972242148695382, 6.9014833278512929e-18],
    tan: [0.42683456035734091, -9.2653565572511215e-18]
  },
  {
    x: 5.5989931312753537e124,
    sin: [0.85350897369840251, -2.3025432746999096e-17],
    cos: [-0.52107814367549488, -1.6287985925446551e-17],
    tan: [-1.6379673261251411, -5.6155592351831647e-17]
  },
  {
    x: -1.675070631914943e54,
    sin: [-0.69219820989894465, -3.3724554062437337e-17],
    cos: [-0.72170744641627227, -6.8939583837686155e-18],
    tan: [0.95911191347150515, 1.1144414104575389e-17]
  },
  {
    x: -2.3669147717114541e139,
    sin: [0.00029878681845940018, 1.8605781198411075e-20],
    cos: [0.99999995536321751, 5.3680053981122268e-17],
    tan: [0.000298786831796283, 1.1656384203547843e-20]
  },
  {
    x: 9.7163303328337242e273,
    sin: [0.59792736084149434, 1.0565526390946667e-17],
    cos: [0.80155029234423303, -1.3654909067547729e-17],
    tan: [0.74596362393279381, -2.9149198058455138e-17]
  },
  {
    x: -1.3546326102559345e44,
    sin: [0.99790881879826221, 4.3425891929007277e-17],
    cos: [-0.06463736817551434, 6.5516641101753433e-18],
    tan: [-15.438574418571177, 5.3251570173902139e-16]
  },
  {
    x: -5.3582130138221455e247,
    sin: [0.50377298533310388, 1.440264353048484e-17],
    cos: [0.86383608355322383, -1.2729993264656792e-17],
    tan: [0.58318122491587809, 1.9619103712021752e-17]
  },
  {
    x: 3.332276516157665e289,
    sin: [0.833848230650723, 3.1967590579271053e-18],
    cos: [0.55199377554521267, 2.1961703223199906e-17],
    tan: [1.5106116546823709, 1.4706458251129691e-17]
  },
  {
    x: 1.0006537739229637e149,
    sin: [0.99788837442458456, 4.2263575461425536e-17],
    cos: [-0.064952230048398285, -5.5245931326813832e-18],
    tan: [-15.36341975758217, -1.0435049910836423e-16]
  },
  {
    x: 6.5533370310255841e144,
    sin: [-0.99005130273167152, -2.7273465263580993e-17],
    cos: [-0.14070685114563561, 1.2392942271887124e-17],
    tan: [7.0362693406232246, -3.1254098036242476e-16]
  },
  {
    x: 4.1458449343306059e284,
    sin: [0.95142303843664877, -4.6449144044986008e-17],
    cos: [-0.3078866705980875, -1.0947775435448369e-17],
    tan: [-3.0901728762354503, 3.7876844987130788e-17]
  },
  {
    x: 7.4284982809316858e257,
    sin: [-0.93971323452206057, -4.7399437122003215e-17],
    cos: [0.34196350223976635, 2.5749707614114329e-17],
    tan: [-2.7479927780806981, 6.6249135369070636e-18]
  },
  {
    x: 4.2311394682466494e201,
    sin: [0.06315208810135782, 5.2495677318768699e-18],
    cos: [0.99800391470596861, 3.6696092257076766e-17],
    tan: [0.063278397179397497, -1.2190338120870931e-18]
  },
  {
    x: 3.9803729141667787e115,
    sin: [-0.99571205434019494, -4.6484829938285438e-17],
    cos: [0.092506782679047841, -5.6784392022894731e-18],
    tan: [-10.763665382189506, 4.0939407520029863e-16]
  },
  {
    x: -3.4925944200693425e107,
    sin: [0.94221084502225949, -4.9179099756225384e-17],
    cos: [-0.33502048224316044, -2.5552566600842064e-17],
    tan: [-2.8123977337552617, -1.2825447930967864e-16]
  },
  {
    x: 9.7539761789389077e262,
    sin: [0.27558530522294322, 5.4683909958715248e-18],
    cos: [-0.9612766196809206, 2.0231400199707686e-17],
    tan: [-0.28668678669665248, -1.7069477999860727e-17]
  },
  {
    x: 4.9379638500830231e31,
    sin: [0.99854365408687562, 2.0592228985036729e-17],
    cos: [-0.053949706976313072, -2.9473702253776775e-18],
    tan: [-18.508787351250895, -6.2806858310439675e-16]
  },
  {
    x: -2.5388588715285947e205,
    sin: [-0.20933876364512333, -1.1601729163311811e-18],
    cos: [-0.97784317865163384, -5.2163781741359471e-17],
    tan: [0.21408214345145243, 1.2180484928929213e-17]
  },
  {
    x: 7.4448252931157552e174,
    sin: [-0.96032789274236374, -1.0601199917156074e-17],
    cos: [0.27887333759434785, -8.9979129567783606e-18],
    tan: [-3.4435988073527022, -1.8089121869998365e-16]
  },
  {
    x: 6.4985771039433373e229,
    sin: [0.20295224061567588, 3.4843777141493882e-18],
    cos: [0.97918863761232278, 1.1373656005370947e-17],
    tan: [0.20726572268093257, 3.0830455861730762e-18]
  },
  {
    x: 4.9472401868871211e66,
    sin: [0.98801758907473514, -1.6878949940372683e-17],
    cos: [0.1543413220072572, -3.8595161428621846e-18],
    tan: [6.4015104718895577, -3.5634417327064061e-16]
  },
  {
    x: -5.6362841295581453e39,
    sin: [-0.99977860838867028, -8.1399065953734129e-18],
    cos: [-0.021041250162807938, -1.1792903623538523e-18],
    tan: [47.515171420558339, -5.6260968222528002e-16]
  },
  {
    x: 2.1909146989605357e245,
    sin: [-0.96173474456276753, -1.5976163011611793e-17],
    cos: [0.27398226420844884, -1.4146110471607852e-17],
    tan: [-3.5102080324114295, 2.0876959749137569e-16]
  },
  {
    x: 4.8366804924925723e223,
    sin: [-0.51886034784142043, -4.0479511684125479e-17],
    cos: [0.85485901728757596, 3.2490231019445528e-17],
    tan: [-0.60695428994565426, -9.4500156046724366e-18]
  },
  {
    x: 2.8319723588673597e289,
    sin: [-0.93630261666378134, -3.5964405849657502e-17],
    cos: [0.35119426252226282, 1.2427631670779615e-17],
    tan: [-2.6660532832720394, -2.7855229614634176e-17]
  },
  {
    x: 3.6871691752861463e214,
    sin: [0.99852031918914286, -5.1345070213395773e-17],
    cos: [-0.05437988751746705, 1.4093804992461362e-18],
    tan: [-18.361941606966617, -2.7363684304398958e-16]
  },
  {
    x: -6.899107099468651e185,
    sin: [-0.26570495543599415, -1.3185351464384287e-17],
    cos: [0.96405439507154178, -3.0648827062967342e-18],
    tan: [-0.27561199533380726, -1.2322748418257409e-17]
  },
  {
    x: 8.6708897332092168e257,
    sin: [0.21728688726508386, 8.3818650858959858e-18],
    cos: [0.97610778535090614, 3.8169608868074126e-17],
    tan: [0.22260542383336307, 9.9980983704966887e-18]
  },
  {
    x: 1.328521054360885e40,
    sin: [-0.0050877492984921302, -3.2555637413807691e-19],
    cos: [0.99998705731978133, 3.5746923027998391e-17],
    tan: [-0.0050878151484566089, 2.7394558187031384e-19]
  },
  {
    x: 1.7005432864709349e42,
    sin: [0.076647377936391384, -6.8836586198840184e-18],
    cos: [-0.99705826281891674, 3.2433526979975623e-17],
    tan: [-0.076873519627319795, -5.1104695370230728e-18]
  },
  {
    x: -6.427908476448346e27,
    sin: [0.97981991959963599, 1.9072617941109424e-17],
    cos: [-0.19988227824337709, -1.301510295604469e-17],
    tan: [-4.9019849493940884, -2.9610960492427623e-18]
  },

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // difficult cases
  // x is close to a multiple of pi/2
  {
    x: 1.5707963267948966,
    sin: [1, -1.8296334471678741e-33],
    cos: [6.123233995736766e-17, -1.4973849048591698e-33],
    tan: [16331239353195370, -0.24403226295847108]
  },
  {
    x: 3.1415926535897931,
    sin: [1.2246467991473532e-16, -2.99476980971834e-33],
    cos: [-1, 7.5111267831102198e-33],
    tan: [-1.2246467991473532e-16, 2.994769809718339e-33]
  },
  {
    x: 45.553093477052002,
    sin: [1, -0],
    cos: [-6.1898063658835771e-19, 5.5580050162449441e-36],
    tan: [-1.6155594228467482e18, -108.44860760021355]
  },
  {
    x: 91.106186954104004,
    sin: [-1.2379612731767154e-18, 1.1116010032489888e-35],
    cos: [-1, 0],
    tan: [1.2379612731767154e-18, -1.1116010032489888e-35]
  },
  {
    x: 46066.743875913933,
    sin: [-1, 9.2444637330587321e-33],
    cos: [1.3593070393188837e-16, -3.5586030461445456e-33],
    tan: [-7356689629894628, 0.45856387454657244]
  },
  {
    x: 92133.487751827866,
    sin: [-2.7186140786377673e-16, 7.1172060922890938e-33],
    cos: [-1, 3.6977854932234928e-32],
    tan: [2.7186140786377673e-16, -7.1172060922890829e-33]
  },
  {
    x: 321307.9594422229,
    sin: [-1, 9.6296497219361793e-34],
    cos: [-4.4296008345961293e-17, -2.1557056759137945e-33],
    tan: [22575397588644696, 1.0662903860527893]
  },
  {
    x: 642615.9188844458,
    sin: [8.8592016691922586e-17, 4.3114113518275891e-33],
    cos: [-1, 3.9481563859938335e-33],
    tan: [-8.8592016691922586e-17, -4.3114113518275891e-33]
  },
  {
    x: 1698673.2849629424,
    sin: [1, -1.2518544638517033e-33],
    cos: [-5.0381366133970251e-17, -5.9319299425940163e-34],
    tan: [-19848608260063392, -0.430821707309269]
  },
  {
    x: 3397346.5699258847,
    sin: [-1.007627322679405e-16, -1.1863859885188031e-33],
    cos: [-1, 5.103714352626175e-33],
    tan: [1.007627322679405e-16, 1.1863859885188036e-33]
  },
  {
    x: 14461176.67027838,
    sin: [-1, 0],
    cos: [-1.6985038298986004e-18, 3.0291743386587563e-36],
    tan: [5.8875345606945101e17, 55.313769241792002]
  },
  {
    x: 28922353.340556759,
    sin: [3.3970076597972008e-18, -6.0583486773175126e-36],
    cos: [-1, 0],
    tan: [-3.3970076597972008e-18, 6.0583486773175126e-36]
  },
  {
    x: 5848238277.5417423,
    sin: [1, -3.1777844082389392e-33],
    cos: [7.992064984149294e-17, -6.0279572563276153e-33],
    tan: [12512410772226020, 0.75060174455665307]
  },
  {
    x: 11696476555.083485,
    sin: [1.5984129968298588e-16, -1.2055914512655231e-32],
    cos: [-1, 1.2807434130175118e-32],
    tan: [-1.5984129968298588e-16, 1.2055914512655229e-32]
  },
  {
    x: 32102760787.642681,
    sin: [1, -2.6963019221421302e-33],
    cos: [-7.3591858275933683e-17, -1.6524951691111259e-34],
    tan: [-13588459694148316, 0.52198515217843855]
  },
  {
    x: 64205521575.285362,
    sin: [-1.4718371655186737e-16, -3.304990338222248e-34],
    cos: [-1, 1.0785207688568521e-32],
    tan: [1.4718371655186737e-16, 3.3049903382222633e-34]
  },
  {
    x: 43799237342.726166,
    sin: [-1, 3.7555633915551099e-33],
    cos: [-8.6249441407052184e-17, -1.0478761451196621e-34],
    tan: [11594277988196164, 0.96734751299203281]
  },
  {
    x: 87598474685.452332,
    sin: [1.7249888281410437e-16, 2.0957522902393177e-34],
    cos: [-1, 1.4925957069001078e-32],
    tan: [-1.7249888281410437e-16, -2.0957522902393434e-34]
  },
  {
    x: 475818273014.77228,
    sin: [-1, 1.2422248141297671e-32],
    cos: [1.5748765917220856e-16, -1.1527893581349241e-32],
    tan: [-6349703876838545, 0.43089851217135966]
  },
  {
    x: 951636546029.54456,
    sin: [-3.1497531834441712e-16, 2.3055787162698485e-32],
    cos: [-1, 4.9592696067971323e-32],
    tan: [3.1497531834441712e-16, -2.3055787162698468e-32]
  },
  {
    x: 563416747700.22461,
    sin: [1, -9.6296497219361793e-35],
    cos: [1.5011223641895818e-17, -5.8848283370513696e-34],
    tan: [66616821110374624, 2.7512966098829974]
  },
  {
    x: 1126833495400.4492,
    sin: [3.0022447283791637e-17, -1.1769656674102739e-33],
    cos: [-1, 4.8148248609680896e-34],
    tan: [-3.0022447283791637e-17, 1.1769656674102739e-33]
  },
  {
    x: 205097628711448.41,
    sin: [1, -1.9259299443872359e-34],
    cos: [1.9177273808217003e-17, 1.0920445384677565e-33],
    tan: [52145055131429776, 3.1318004196753777]
  },
  {
    x: 410195257422896.81,
    sin: [3.8354547616434006e-17, 2.1840890769355129e-33],
    cos: [-1, 7.7037197775489434e-34],
    tan: [-3.8354547616434006e-17, -2.1840890769355129e-33]
  },
  {
    x: 1426668733016935.2,
    sin: [-1, 5.585196838722984e-33],
    cos: [1.0593866161281405e-16, 4.5103782685805542e-33],
    tan: [-9439424519584856, -0.62777799509919341]
  },
  {
    x: 2853337466033870.5,
    sin: [-2.118773232256281e-16, -9.0207565371611071e-33],
    cos: [-1, 2.2437083852111298e-32],
    tan: [2.118773232256281e-16, 9.0207565371611112e-33]
  },
  {
    x: 3067449762708522.5,
    sin: [-1, 1.1555579666323415e-33],
    cos: [-4.7479528852921981e-17, 1.936997782877657e-33],
    tan: [21061708575451840, 1.7032420015970537]
  },
  {
    x: 6134899525417045,
    sin: [9.4959057705843963e-17, -3.873995565755314e-33],
    cos: [-1, 4.5259353693100043e-33],
    tan: [-9.4959057705843963e-17, 3.873995565755314e-33]
  },
  {
    x: 12055686754159438,
    sin: [-1, 2.4074124304840448e-33],
    cos: [6.9438736666862174e-17, -3.6571775803233844e-33],
    tan: [-14401183662047008, 0.10122170159620407]
  },
  {
    x: 24111373508318876,
    sin: [-1.3887747333372435e-16, 7.3143551606467701e-33],
    cos: [-1, 9.6296497219361793e-33],
    tan: [1.3887747333372435e-16, -7.3143551606467688e-33]
  },
  {
    x: 24325485804993528,
    sin: [-1, 7.2222372914521344e-33],
    cos: [-1.2047937874482574e-16, -8.2351380928910658e-33],
    tan: [8300175601984063, 0.25046980832403976]
  },
  {
    x: 48650971609987056,
    sin: [2.4095875748965148e-16, 1.6470276185782129e-32],
    cos: [-1, 2.89852456630279e-32],
    tan: [-2.4095875748965148e-16, -1.6470276185782137e-32]
  },
  {
    x: 1.2119920443161834e17,
    sin: [1, -3.4666738998970245e-33],
    cos: [8.3683189567028556e-17, 2.3562696677318077e-33],
    tan: [11949831324235318, -0.25702567480531258]
  },
  {
    x: 2.4239840886323667e17,
    sin: [1.6736637913405711e-16, 4.7125393354636153e-33],
    cos: [-1, 1.396299209680746e-32],
    tan: [-1.6736637913405711e-16, -4.7125393354636174e-33]
  },
  {
    x: 5.0869407893811757e17,
    sin: [1, -2.0222264416065976e-33],
    cos: [-6.3501567144160202e-17, 3.4926992552513943e-33],
    tan: [-15747642853125446, -0.30155248491508185]
  },
  {
    x: 1.0173881578762351e18,
    sin: [-1.270031342883204e-16, 6.98539851050279e-33],
    cos: [-1, 8.0889057664263906e-33],
    tan: [1.270031342883204e-16, -6.9853985105027886e-33]
  },
  {
    x: 5.3193726483265414e255,
    sin: [1, -0],
    cos: [-4.6871659242546277e-19, 4.3720557429382733e-36],
    tan: [-2.1334853857537039e18, 92.325147336655519]
  },
  {
    x: 1.0638745296653083e256,
    sin: [-9.3743318485092553e-19, 8.7441114858765467e-36],
    cos: [-1, 0],
    tan: [9.3743318485092553e-19, -8.7441114858765467e-36]
  }
];

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const ASIN_ACOS = [
  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // special cases
  {
    x: 0,
    asin: [0, 0],
    acos: [1.5707963267948966, 6.123233995736766e-17]
  },
  {
    x: -0,
    asin: [-0, -0],
    acos: [1.5707963267948966, 6.123233995736766e-17]
  },
  {
    x: Number.MIN_VALUE,
    asin: [Number.MIN_VALUE, 0],
    acos: [1.5707963267948966, 6.123233995736766e-17]
  },
  {
    x: -Number.MIN_VALUE,
    asin: [-Number.MIN_VALUE, -0],
    acos: [1.5707963267948966, 6.123233995736766e-17]
  },
  {
    x: MIN_NORMAL_VALUE,
    asin: [MIN_NORMAL_VALUE, 0],
    acos: [1.5707963267948966, 6.123233995736766e-17]
  },
  {
    x: -MIN_NORMAL_VALUE,
    asin: [-MIN_NORMAL_VALUE, -0],
    acos: [1.5707963267948966, 6.123233995736766e-17]
  },
  {
    x: 0.5,
    asin: [0.52359877559829893, -5.3604088322554549e-17],
    acos: [1.0471975511965979, -1.072081766451091e-16]
  },
  {
    x: -0.5,
    asin: [-0.52359877559829893, 5.3604088322554549e-17],
    acos: [2.0943951023931957, -2.144163532902182e-16]
  },
  {
    x: 0.70710678118654757,
    asin: [0.78539816339744839, -1.2048045907212592e-17],
    acos: [0.78539816339744828, -3.7741916597935402e-17]
  },
  {
    x: -0.70710678118654757,
    asin: [-0.78539816339744839, 1.2048045907212592e-17],
    acos: [2.3561944901923448, 1.6020659651267073e-16]
  },
  {
    x: 0.8660254037844386,
    asin: [1.0471975511965976, 1.4485586061853191e-17],
    acos: [0.52359877559829893, 4.6746753895514466e-17]
  },
  {
    x: -0.8660254037844386,
    asin: [-1.0471975511965976, -1.4485586061853191e-17],
    acos: [2.6179938779914944, -1.4632667890581047e-16]
  },
  {
    x: 1 + Number.EPSILON * -0.5,
    asin: [1.5707963118937354, 6.1232339819504221e-17],
    acos: [1.4901161193847656e-8, 1.3786343542550463e-25]
  },
  {
    x: -(1 + Number.EPSILON * -0.5),
    asin: [-1.5707963118937354, -6.1232339819504221e-17],
    acos: [3.1415926386886319, 1.2246467977687189e-16]
  },
  {
    x: 1,
    asin: [1.5707963267948966, 6.123233995736766e-17],
    acos: [0, 0]
  },
  {
    x: -1,
    asin: [-1.5707963267948966, -6.123233995736766e-17],
    acos: [3.1415926535897931, 1.2246467991473532e-16]
  },
  {
    x: 1 + Number.EPSILON * 1,
    asin: [NaN, NaN],
    acos: [NaN, NaN]
  },
  {
    x: -(1 + Number.EPSILON * 1),
    asin: [NaN, NaN],
    acos: [NaN, NaN]
  },
  {
    x: Number.MAX_VALUE,
    asin: [NaN, NaN],
    acos: [NaN, NaN]
  },
  {
    x: -Number.MAX_VALUE,
    asin: [NaN, NaN],
    acos: [NaN, NaN]
  },
  {
    x: Infinity,
    asin: [NaN, NaN],
    acos: [NaN, NaN]
  },
  {
    x: -Infinity,
    asin: [NaN, NaN],
    acos: [NaN, NaN]
  },
  {
    x: NaN,
    asin: [NaN, NaN],
    acos: [NaN, NaN]
  },

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // random cases
  {
    x: -0.69764890172950667,
    asin: [-0.7721105895043987, -1.3182343497140166e-18],
    acos: [2.3429069162992953, 6.2550574307081673e-17]
  },
  {
    x: 0.42029762850169128,
    asin: [0.43377330154793714, -1.722486329298232e-17],
    acos: [1.1370230252469595, -3.2565099212165673e-17]
  },
  {
    x: -0.65435177157141045,
    asin: [-0.71332507295779091, 3.9057230367420114e-17],
    acos: [2.2841213997526877, -1.9986949533508376e-16]
  },
  {
    x: -0.45009592215708638,
    asin: [-0.46687275414929663, -2.7067000048984943e-17],
    acos: [2.0376690809441933, -2.2722962456163051e-17]
  },
  {
    x: -0.298510980242503,
    asin: [-0.30313211947675472, 1.1011145093113488e-17],
    acos: [1.8739284462716512, 1.05732346095512e-16]
  },
  {
    x: 0.70731133699893523,
    asin: [0.78568749086081613, -3.0628741632932888e-17],
    acos: [0.78510883593408054, -1.9161220872215109e-17]
  },
  {
    x: -0.66174801435819353,
    asin: [-0.72314790540150375, -1.6246690037114675e-18],
    acos: [2.2939442321964005, -1.5918759596395218e-16]
  },
  {
    x: 0.94581366407121159,
    asin: [1.2400913451566926, -5.3460458707601562e-17],
    acos: [0.33070498163820405, 3.6704962024535704e-18]
  },
  {
    x: 0.972419066485259,
    asin: [1.3353874951730131, 5.6687203181271347e-17],
    acos: [0.23540883162188342, 4.5451367760963176e-18]
  },
  {
    x: -0.88990353466964489,
    asin: [-1.0971336480950213, -3.7132553980582417e-17],
    acos: [2.6679299748899181, -1.2367971098708124e-16]
  },
  {
    x: 0.45752961281578886,
    asin: [0.47521497556596365, 1.1747297140388317e-17],
    acos: [1.095581351228933, -6.0261084142784855e-18]
  },
  {
    x: -0.30419613645171939,
    asin: [-0.30909446116074296, -4.1797253920175007e-18],
    acos: [1.8798907879556397, -1.0112138834438832e-16]
  },
  {
    x: 0.60965256163451542,
    asin: [0.65562220230719748, 1.9777516487283023e-17],
    acos: [0.91517412448769908, 4.1454823470084634e-17]
  },
  {
    x: -0.83566462800906693,
    asin: [-0.98934176020558051, 5.8061476316422353e-18],
    acos: [2.5601380870004773, -1.6661841259930588e-16]
  },
  {
    x: -0.8874984184223047,
    asin: [-1.0918878097456299, -5.1475084386255995e-18],
    acos: [2.6626841365405265, 6.6379848395993254e-17]
  },
  {
    x: 0.61846299867927268,
    asin: [0.66678525868718019, 2.7813039431415465e-17],
    acos: [0.90401106810771636, 3.3419300525952195e-17]
  },
  {
    x: -0.76958564278198827,
    asin: [-0.87819198785371766, -1.8283424832317477e-17],
    acos: [2.4489883146486142, 7.9515764789685141e-17]
  },
  {
    x: -0.072465027744748944,
    asin: [-0.072528599234729568, 4.1893364943248512e-19],
    acos: [1.6433249260296261, 8.856898192356409e-17]
  },
  {
    x: 0.50022379658230909,
    asin: [0.52385721291582343, 2.2745369924190068e-18],
    acos: [1.0469391138790731, 5.8957802964948654e-17]
  },
  {
    x: -0.23692158695864629,
    asin: [-0.23919599280159462, 8.1550286942832515e-18],
    acos: [1.8099923195964913, -8.5700566815060156e-17]
  },
  {
    x: 0.27860260197042219,
    asin: [0.28233879461341799, 2.7371957658320113e-17],
    acos: [1.2884575321814786, -2.165076893221028e-17]
  },
  {
    x: -0.92725582132261586,
    asin: [-1.1870160499450022, -2.7642468348895864e-17],
    acos: [2.7578123767398988, 8.8874808306263522e-17]
  },
  {
    x: -0.99415744218503832,
    asin: [-1.4626459135497576, 1.0344579803931029e-16],
    acos: [3.0334422403446539, 1.7983114684308867e-16]
  },
  {
    x: 0.58940810198467286,
    asin: [0.63032594848620682, -1.3869036657704643e-17],
    acos: [0.94047037830868985, -3.5920925847443349e-17]
  },
  {
    x: -0.14402874710921854,
    asin: [-0.14453141587903101, -1.1860268388148756e-17],
    acos: [1.7153277426739277, -9.344084534825706e-17]
  },
  {
    x: -0.4827723756129898,
    asin: [-0.50381769083080652, 1.3435384172658902e-17],
    acos: [2.0746140176257031, 4.7796955784708755e-17]
  },
  {
    x: 0.0058867180633526139,
    asin: [0.0058867520630640543, 1.0907008211019636e-19],
    acos: [1.5649095747318327, -1.1061435424644644e-16]
  },
  {
    x: 0.77160456796979604,
    asin: [0.88135980594484131, 3.3301537134952762e-17],
    acos: [0.68943652085005525, 2.7930802822414893e-17]
  },
  {
    x: -0.37962694706484301,
    asin: [-0.38939302350624311, -3.0724595547599874e-18],
    acos: [1.9601893503011398, -1.0222865418164584e-16]
  },
  {
    x: 0.11188677323495133,
    asin: [0.11212154343338056, -6.6683311724026008e-18],
    acos: [1.4586747833615161, -5.6999419140559853e-17]
  },
  {
    x: -0.082355331341463778,
    asin: [-0.08244871110046452, -6.1844620119387555e-18],
    acos: [1.6532450378953611, -1.9721370697658694e-18]
  },
  {
    x: -0.69947985064886931,
    asin: [-0.7746694015812331, -4.578128803656906e-17],
    acos: [2.3454657283761295, 2.1803593045645238e-16]
  },
  {
    x: 0.70318783167826782,
    asin: [0.77987117746118029, 4.0975508617977426e-17],
    acos: [0.79092514933371627, 2.0256831339390235e-17]
  },
  {
    x: -0.22774538521392751,
    asin: [-0.22976158995976045, 1.2086828791822577e-17],
    acos: [1.800557916754657, 2.138993554991617e-17]
  },
  {
    x: 0.79440554739441716,
    asin: [0.91802824843035646, 3.5300739783402268e-17],
    acos: [0.65276807836454009, 2.5931600173965389e-17]
  },
  {
    x: 0.61921102572575482,
    asin: [0.66773752939174613, -2.8074946475379005e-17],
    acos: [0.90305879740315054, -2.1715016029768989e-17]
  },
  {
    x: 0.37868537994490259,
    asin: [0.38837547902507646, 5.2540331048224435e-18],
    acos: [1.1824208477698201, 4.6715562128738793e-19]
  },
  {
    x: 0.26007172320063399,
    asin: [0.26309648136532182, -1.6335009141018949e-17],
    acos: [1.3076998454295747, 7.7567349098386607e-17]
  },
  {
    x: 0.1270364536338664,
    asin: [0.12738065040310048, 1.3711054245745852e-17],
    acos: [1.443415676391796, 1.0303243694287963e-16]
  },
  {
    x: -0.88189047753049898,
    asin: [-1.0798571688794831, -3.0169292811662713e-17],
    acos: [2.6506534956743799, -1.3064297215600093e-16]
  },
  {
    x: -0.37138871926220984,
    asin: [-0.38050426926077524, 1.8862966147107771e-18],
    acos: [1.951300596055672, -1.071874103511166e-16]
  },
  {
    x: 0.94101182288203278,
    asin: [1.2256082318736521, 6.4092447081868296e-17],
    acos: [0.34518809492124447, -2.8601071245006373e-18]
  },
  {
    x: -0.33604383750365141,
    asin: [-0.34271329982184756, -2.1212060176687647e-17],
    acos: [1.9135096266167442, 2.6933248902797478e-17]
  },
  {
    x: -0.38971307634291286,
    asin: [-0.40032001570079295, 2.1765834910129014e-17],
    acos: [1.9711163424956895, 9.4977656278496474e-17]
  },
  {
    x: -0.38147131559301872,
    asin: [-0.39138745188352503, -1.887165353034789e-17],
    acos: [1.9621837786784218, -8.642946020605793e-17]
  },
  {
    x: -0.02445423797784807,
    asin: [-0.024456675946116987, -3.0935003755559604e-19],
    acos: [1.5952530027410137, -6.3358400275406861e-17]
  },
  {
    x: 0.56586050578096447,
    asin: [0.60147654883950608, -2.0629091197687459e-17],
    acos: [0.96931977795539059, -2.9160871307460535e-17]
  },
  {
    x: 0.29865528879871661,
    asin: [0.30328332550331333, 1.5156824296792892e-17],
    acos: [1.2675130012915832, 1.0158666689183259e-16]
  },
  {
    x: 0.67260425562417403,
    asin: [0.73772243709697638, 1.2933099953416114e-17],
    acos: [0.83307388969792018, 4.8299240003951544e-17]
  },
  {
    x: -0.56806033161308322,
    asin: [-0.60414706862389977, 2.894894027014988e-17],
    acos: [2.1749433954187962, 1.4330570214973345e-16]
  },
  {
    x: -0.52144888404494516,
    asin: [-0.54854808353275453, 2.5823895732998274e-18],
    acos: [2.1193444103276513, -1.6339465454096347e-16]
  },
  {
    x: 0.46820037243420165,
    asin: [0.48725302857536174, 4.9392073973252597e-18],
    acos: [1.083543298219535, -1.1024032113373108e-16]
  },
  {
    x: -0.58626015265334175,
    asin: [-0.62643469197155999, 4.5616161708085503e-17],
    acos: [2.1972310187664568, -2.0642842667574916e-16]
  },
  {
    x: 0.15122940788449624,
    asin: [0.1518118669967303, -3.2890167923028269e-18],
    acos: [1.4189844597981662, 9.2276932365299402e-17]
  },
  {
    x: -0.06991295457071045,
    asin: [-0.069970033877550158, -1.0819408631427185e-18],
    acos: [1.6407663606724467, 3.4558705204881463e-17]
  },
  {
    x: 0.87592865925568475,
    asin: [1.0673573848323801, -8.1958008775869072e-17],
    acos: [0.5034389419625166, 3.2168046270721078e-17]
  },
  {
    x: 0.4270585046429054,
    asin: [0.44123720784070919, -1.4881706281309734e-17],
    acos: [1.1295591189541874, 7.6114046238677398e-17]
  },
  {
    x: -0.73017254076643301,
    asin: [-0.8185744413162378, 9.5204647943203297e-18],
    acos: [2.3893707681111342, 1.6273417762556299e-16]
  },
  {
    x: -0.72516662715642832,
    asin: [-0.8112763524067983, -1.2456546997468713e-18],
    acos: [2.3820726792016949, 6.247799465711453e-17]
  },
  {
    x: 0.8137316494697111,
    asin: [0.95054370658406551, -4.5975268678081725e-17],
    acos: [0.62025262021083116, -3.8146938270662706e-18]
  },
  {
    x: 0.9128726123472215,
    asin: [1.1502661144423503, -4.8810009875028005e-17],
    acos: [0.4205302123525464, -9.7995263011999097e-19]
  },
  {
    x: -0.97686407153637145,
    asin: [-1.3552704821506874, -8.0618589476877243e-17],
    acos: [2.9260668089455839, 1.4185092943424489e-16]
  },
  {
    x: -0.0066765462602482728,
    asin: [-0.0066765958638313819, -2.9360891357523324e-19],
    acos: [1.5774729226587281, -7.0313035303294448e-17]
  },
  {
    x: 0.52257913275671264,
    asin: [0.54987320954397634, -3.5782946422805336e-17],
    acos: [1.0209231172509203, -1.4007016082342661e-17]
  },
  {
    x: 0.18417219289513165,
    asin: [0.18522958174208601, -1.2979676050138298e-17],
    acos: [1.3855667450528106, -9.0547108393807838e-18]
  },
  {
    x: -0.80661098873689019,
    asin: [-0.93839590994025257, 3.6472955936407941e-17],
    acos: [2.5091922367351494, -1.9728522090407159e-16]
  },
  {
    x: -0.38536149077772741,
    asin: [-0.39559953761774974, -6.4733290208928953e-18],
    acos: [1.9663958644126465, -9.8827784715512932e-17]
  },
  {
    x: 0.21213932083554177,
    asin: [0.21376358865301642, -2.8934301487158652e-18],
    acos: [1.3570327381418803, -1.0240768358768995e-16]
  },
  {
    x: -0.37356268834111095,
    asin: [-0.38284680327005621, -5.2578922943746938e-18],
    acos: [1.9536431300649528, 1.0979081020484526e-17]
  },
  {
    x: 0.58800101307683406,
    asin: [0.62858525156059031, -2.5101570404414318e-17],
    acos: [0.94221107523430636, -2.4688392100733679e-17]
  },
  {
    x: 0.32476644496354234,
    asin: [0.33076477697632645, 2.1464450951284122e-17],
    acos: [1.2400315498185701, 3.9767889006083535e-17]
  },
  {
    x: 0.80089009210422768,
    asin: [0.92878017545322322, -4.9162640356518943e-17],
    acos: [0.64201615134167345, -6.2732214862905365e-19]
  },
  {
    x: 0.81310144719443489,
    asin: [0.94946029178427482, -1.7185271952688497e-17],
    acos: [0.62133603501062185, -3.2604690552459496e-17]
  },
  {
    x: 0.063641196776277109,
    asin: [0.06368423521361323, 3.5668339966813012e-18],
    acos: [1.5071120915812835, -6.7234584309643759e-17]
  },
  {
    x: 0.21028589723672342,
    asin: [0.2118673866931893, -7.3423273606297355e-18],
    acos: [1.3589289401017073, 4.0819091702368478e-17]
  },
  {
    x: -0.031991860682049289,
    asin: [-0.031997320364027491, 8.9121559374765785e-19],
    acos: [1.6027936471589241, -2.9864496387173967e-17]
  },
  {
    x: 0.4192658259122064,
    asin: [0.43263648559426787, -2.3850230947801494e-18],
    acos: [1.1381598412006289, -1.0291609064162567e-16]
  },
  {
    x: -0.29753027143373822,
    asin: [-0.3021047252328169, 2.7561787434710734e-17],
    acos: [1.8729010520277134, 8.918170375391475e-17]
  },
  {
    x: 0.83134365655510178,
    asin: [0.98152102833841037, -1.3704917894982847e-18],
    acos: [0.5892752984564863, -4.841947071564971e-17]
  },
  {
    x: 0.28308560675760841,
    asin: [0.28700979646557562, 1.3675879222971724e-17],
    acos: [1.283786530329321, -7.9546904968618918e-18]
  },
  {
    x: -0.91694682375228842,
    asin: [-1.1603600304801844, 7.4201562788139758e-17],
    acos: [2.731156357275081, -1.2969222830772095e-17]
  },
  {
    x: -0.16193037680636202,
    asin: [-0.16264653462250131, 6.1291707814670527e-18],
    acos: [1.733442861417398, -8.3674708902243957e-17]
  },
  {
    x: 0.87517608877290032,
    asin: [1.0657996635595606, 1.0667340895342079e-16],
    acos: [0.50499666323533599, -4.544106899605314e-17]
  },
  {
    x: 0.095982096192317012,
    asin: [0.09613008403789515, 8.5371943031086894e-20],
    acos: [1.4746662427570014, 4.7269180206522116e-17]
  },
  {
    x: -0.44581264756829642,
    asin: [-0.46208191380728308, 1.9189698554404606e-17],
    acos: [2.0328782406021797, -1.3468509828294776e-17]
  },
  {
    x: 0.097702046267547082,
    asin: [0.09785815668855212, -5.2645314830363313e-18],
    acos: [1.4729381701063444, 8.0374659248218453e-17]
  },
  {
    x: 0.041655688821768067,
    asin: [0.041667745038391005, 2.7690006892166365e-18],
    acos: [1.5291285817565057, -6.6436751002179094e-17]
  },
  {
    x: 0.1581989805367936,
    asin: [0.15886639685755968, 4.2051152641407662e-18],
    acos: [1.4119299299373369, 2.9271649077597982e-17]
  },
  {
    x: 0.8776228141463962,
    asin: [1.0708802925965073, 8.9089254793565882e-17],
    acos: [0.4999160341983892, 2.7654236395059606e-17]
  },
  {
    x: 0.62166230005368028,
    asin: [0.67086313564528277, -4.5577055499083464e-17],
    acos: [0.8999331911496139, -4.2129070060645306e-18]
  },
  {
    x: -0.42319763630837803,
    asin: [-0.43697167745715831, -2.4346862811907961e-17],
    acos: [2.0077680042520551, -1.9197655338701351e-16]
  },
  {
    x: -0.79463515052635092,
    asin: [-0.91840635935044912, 8.8296464227377003e-18],
    acos: [2.4892026861453456, 1.6342499599714561e-16]
  },
  {
    x: 0.067879642525947137,
    asin: [0.067931878465797998, 1.1755831977715652e-18],
    acos: [1.5028644483290987, -9.2598909126362927e-17]
  },
  {
    x: -0.82703840280395235,
    asin: [-0.97381869968078738, -1.3291699567650925e-17],
    acos: [2.5446150264756842, -1.4752056540001273e-16]
  },
  {
    x: -0.78424655920257225,
    asin: [-0.90148084625302494, 7.5038375545736958e-18],
    acos: [2.4722771730479214, 1.6475080486530961e-16]
  },
  {
    x: 0.59893626076386886,
    asin: [0.64217209670920983, -2.5722934066946954e-17],
    acos: [0.92862423008568684, -2.4067028438201043e-17]
  },
  {
    x: 0.32082712477327169,
    asin: [0.32660264704359782, -4.9488161497966641e-19],
    acos: [1.2441936797512989, -1.0480623212142615e-16]
  },
  {
    x: -0.55448761885209041,
    asin: [-0.58774713909253296, -3.098044176840546e-17],
    acos: [2.1585434658874294, 2.0323508418828877e-16]
  },
  {
    x: -0.97953758897853938,
    asin: [-1.3681509252651536, -6.722248128341067e-17],
    acos: [2.9389472520600504, -9.358978368425299e-17]
  },
  {
    x: -0.84453221364566389,
    asin: [-1.0056910215476409, 6.8035754155633487e-18],
    acos: [2.5764873483425377, -1.6761584038322701e-16]
  }
];

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const ATAN = [
  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // special cases
  {
    x: 0,
    expected: [0, 0]
  },
  {
    x: -0,
    expected: [-0, -0]
  },
  {
    x: Number.MIN_VALUE,
    expected: [Number.MIN_VALUE, -0]
  },
  {
    x: -Number.MIN_VALUE,
    expected: [-Number.MIN_VALUE, 0]
  },
  {
    x: MIN_NORMAL_VALUE,
    expected: [MIN_NORMAL_VALUE, -0]
  },
  {
    x: -MIN_NORMAL_VALUE,
    expected: [-MIN_NORMAL_VALUE, 0]
  },
  {
    x: 1,
    expected: [0.78539816339744828, 3.061616997868383e-17]
  },
  {
    x: -1,
    expected: [-0.78539816339744828, -3.061616997868383e-17]
  },
  {
    x: Number.MAX_VALUE,
    expected: [1.5707963267948966, 6.123233995736766e-17]
  },
  {
    x: -Number.MAX_VALUE,
    expected: [-1.5707963267948966, -6.123233995736766e-17]
  },
  {
    x: Infinity,
    expected: [1.5707963267948966, 6.123233995736766e-17]
  },
  {
    x: -Infinity,
    expected: [-1.5707963267948966, -6.123233995736766e-17]
  },
  {
    x: NaN,
    expected: [NaN, NaN]
  },

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // random cases
  {
    x: 3.5082524062722493,
    expected: [1.2931181360975936, 8.29674547318317e-17]
  },
  {
    x: 0.6107899857396174,
    expected: [0.54831556090721778, -4.713839523682705e-17]
  },
  {
    x: -6.1890280123121837,
    expected: [-1.4106045285696363, -1.0944026749728718e-16]
  },
  {
    x: -0.41751302068403701,
    expected: [-0.39551205666610839, 1.4425253935752845e-17]
  },
  {
    x: -2.8689468685905757,
    expected: [-1.2354049711951889, -5.2996879053346914e-17]
  },
  {
    x: 2.9110182645347806,
    expected: [1.2399038063414196, 9.852561202078376e-17]
  },
  {
    x: 1.2499903181090417,
    expected: [0.89605160625458891, 3.0691801140928899e-18]
  },
  {
    x: 0.18972427341187692,
    expected: [0.18749581339535287, -8.3217053054858972e-18]
  },
  {
    x: -0.071796874440721428,
    expected: [-0.071673888631891988, -6.8817546921354109e-18]
  },
  {
    x: 0.35363306727493443,
    expected: [0.33990773139765623, -7.9163053165684752e-18]
  },
  {
    x: 3.7479939330940581,
    expected: [1.3100606856336989, -2.5781901442937199e-18]
  },
  {
    x: -0.81640208952157245,
    expected: [-0.68466250553406072, -1.6404232615783304e-17]
  },
  {
    x: -0.42839511829319771,
    expected: [-0.40474282499023917, -5.9980984182729236e-19]
  },
  {
    x: 1.6601542909934792,
    expected: [1.0286479969808704, 3.4223794968099937e-17]
  },
  {
    x: 0.54300085068085691,
    expected: [0.49745370718945103, -3.2444946368652138e-18]
  },
  {
    x: -1.0245717247171011,
    expected: [-0.79753431942785702, -5.5015689085827841e-17]
  },
  {
    x: 12.24309991919624,
    expected: [1.4892985799231766, -1.491971749177458e-17]
  },
  {
    x: -0.88501649444878949,
    expected: [-0.72447497691345497, -1.2433979383123561e-17]
  },
  {
    x: 51.376513645614558,
    expected: [1.5513346375245982, -2.2232971741629999e-17]
  },
  {
    x: 0.40593321034120422,
    expected: [0.38561072602797253, 3.8989138369608276e-18]
  },
  {
    x: 0.82106371217345364,
    expected: [0.68745335744697189, -1.7421464846312414e-17]
  },
  {
    x: 0.7582529603160959,
    expected: [0.64876211360972702, -2.5789204524825286e-17]
  },
  {
    x: -0.57362878826439323,
    expected: [-0.52080316719662356, 4.5695703532186887e-17]
  },
  {
    x: -1.557605599336334,
    expected: [-1.0000577596830349, 1.8838936607978597e-17]
  },
  {
    x: -0.0090625823302167043,
    expected: [-0.0090623342379427575, -9.0893511505984386e-20]
  },
  {
    x: -0.0036031903577505896,
    expected: [-0.0036031747644883682, 3.7583479424995736e-20]
  },
  {
    x: 7.2595623827078395,
    expected: [1.4339084492739931, 9.3317852261716081e-17]
  },
  {
    x: -1.0038444731794876,
    expected: [-0.78731670972876533, -2.2972253785696013e-17]
  },
  {
    x: -0.83197978013742691,
    expected: [-0.69393892597431517, -4.4460748826885022e-17]
  },
  {
    x: -101.14441837525541,
    expected: [-1.5609097958850717, -8.7538808139950868e-17]
  },
  {
    x: -0.89448302966827897,
    expected: [-0.72975867684866802, 2.3635815833645398e-17]
  },
  {
    x: 0.7840870562969221,
    expected: [0.66496233144242389, 2.5130002630332395e-17]
  },
  {
    x: 4.6372984380908848,
    expected: [1.3584058526568479, 8.401716224224834e-17]
  },
  {
    x: 0.26494423528272332,
    expected: [0.25899362416828653, -5.5488754266549796e-18]
  },
  {
    x: 0.90355925539921811,
    expected: [0.73477806466500406, -5.4534274572150277e-17]
  },
  {
    x: 0.86833916450106086,
    expected: [0.71504501500946605, 4.6295270552996828e-17]
  },
  {
    x: 3.6744162225797918,
    expected: [1.3050797319667131, -7.8132927345437157e-18]
  },
  {
    x: -1.3517322375041223,
    expected: [-0.93386074504869654, 1.313496601567037e-17]
  },
  {
    x: -0.91663404444081353,
    expected: [-0.7419295409234361, -4.9084141131519059e-17]
  },
  {
    x: -0.063617731237385067,
    expected: [-0.063532114153759617, -1.782555375693955e-18]
  },
  {
    x: 2.1509875975974242,
    expected: [1.135618636304621, 2.3478038504480251e-17]
  },
  {
    x: -0.95322642989283168,
    expected: [-0.76145591497586118, -3.7679817871903776e-17]
  },
  {
    x: -0.82339893662397179,
    expected: [-0.6888466361941683, 1.3213366007516312e-17]
  },
  {
    x: -1.6648626151993409,
    expected: [-1.0298989031435659, -7.1297169973460355e-18]
  },
  {
    x: -0.8950214795016278,
    expected: [-0.73005771902473227, 1.2627831235201446e-17]
  },
  {
    x: 6.5031726023544731,
    expected: [1.4182203184077191, -5.102800605053807e-20]
  },
  {
    x: 0.97714877818721357,
    expected: [0.77384101369748437, 3.9654657751185441e-17]
  },
  {
    x: -1.0841676916239855,
    expected: [-0.82576054906960572, -1.8742777885562928e-17]
  },
  {
    x: 1.0716021923495143,
    expected: [0.81994808803963781, -4.5292573926192155e-17]
  },
  {
    x: 2.8012486932441245,
    expected: [1.2279135854189676, -3.1856127486663286e-17]
  },
  {
    x: 0.091565804579146148,
    expected: [0.091311179315535396, -2.4072273768028643e-18]
  },
  {
    x: 0.73278676795536246,
    expected: [0.63239331689046541, 5.3319773218923709e-17]
  },
  {
    x: -13.162591729902058,
    expected: [-1.4949691115656165, -6.1254048691383168e-17]
  },
  {
    x: 0.26365532220285232,
    expected: [0.25778886865284484, -1.4735505181288977e-18]
  },
  {
    x: -1.7861367926596261,
    expected: [-1.0604088531702276, 7.8669012401926862e-18]
  },
  {
    x: 0.66857376719816353,
    expected: [0.58932174204366916, -2.5393124733227715e-17]
  },
  {
    x: -0.31633778437761723,
    expected: [-0.30637738269772014, -1.9105220177074364e-17]
  },
  {
    x: -0.77561857857594785,
    expected: [-0.65969641324939832, -2.2619204526254051e-17]
  },
  {
    x: 0.81561274376671822,
    expected: [0.68418867104039138, -2.460084896654984e-17]
  },
  {
    x: -0.27652002154832039,
    expected: [-0.26977881293845568, 6.2056690886895213e-18]
  },
  {
    x: 12.90797583469085,
    expected: [1.4934792806268182, 3.2472952934928383e-17]
  },
  {
    x: 1.5391399562770496,
    expected: [0.9946225421936109, 8.5628201988768307e-18]
  },
  {
    x: -389.63804699125325,
    expected: [-1.5682298479509635, 7.5492555564160499e-17]
  },
  {
    x: 2.6211726502360957,
    expected: [1.2063317016753472, 5.8198894951985775e-17]
  },
  {
    x: 0.039527220281373156,
    expected: [0.039506653766436473, 3.1400527059041379e-19]
  },
  {
    x: -0.58358433679534694,
    expected: [-0.52826170516175874, -1.0119072689763098e-17]
  },
  {
    x: -17.261302980335472,
    expected: [-1.5129279548437695, 3.4522699415209213e-17]
  },
  {
    x: -0.82158321566975256,
    expected: [-0.68776358801840765, -1.5668051565038684e-17]
  },
  {
    x: -0.30801811867500589,
    expected: [-0.2987965370584364, -1.1015916574742548e-18]
  },
  {
    x: 0.29835349479634837,
    expected: [0.28994555555215629, -2.1805563580699887e-17]
  },
  {
    x: 3.2333138432345367,
    expected: [1.2708474687570275, -5.8841950278063847e-17]
  },
  {
    x: 0.836633248254669,
    expected: [0.69668260904060419, -1.4530809844915703e-18]
  },
  {
    x: 0.64129700283918001,
    expected: [0.57023277051853405, 1.0607074349143717e-17]
  },
  {
    x: -1.8119413204315586,
    expected: [-1.0664999589587694, -3.9315775662914602e-17]
  },
  {
    x: -2.6093039901310591,
    expected: [-1.2048177342610069, -1.0375844669288729e-16]
  },
  {
    x: 3.730564760571125,
    expected: [1.3088973557264811, -8.1672676265670848e-17]
  },
  {
    x: 1.6707995102687003,
    expected: [1.0314688230499236, 2.5273073975595872e-17]
  },
  {
    x: 0.40953274462021877,
    expected: [0.38869715229505081, -5.9496570862949144e-18]
  },
  {
    x: 0.3016245993164639,
    expected: [0.29294658532244255, -1.7911435263528754e-18]
  },
  {
    x: 0.84000904214189764,
    expected: [0.69866512614127507, 1.5269055085693279e-17]
  },
  {
    x: -3.1174419859927913,
    expected: [-1.2603897880992698, -2.3311473112957027e-17]
  },
  {
    x: -1.9512240560590717,
    expected: [-1.0971997426087117, -1.0672043088065125e-18]
  },
  {
    x: 16.776140620433559,
    expected: [1.5112583107822195, 8.888463416436358e-17]
  },
  {
    x: 1.3556106753078769,
    expected: [0.93523004471093063, 1.2076043711989578e-17]
  },
  {
    x: 0.87626655959624578,
    expected: [0.71954689301042052, -2.1015787617333117e-17]
  },
  {
    x: -0.43940578521853302,
    expected: [-0.41400893145322593, 2.1760159726951732e-17]
  },
  {
    x: 1.4333911181600851,
    expected: [0.96165177889836362, -1.615806191076991e-17]
  },
  {
    x: 3.4228848803626586,
    expected: [1.2865557097296527, 2.6909521530759256e-17]
  },
  {
    x: 4.3761682336102581,
    expected: [1.3461431475054797, 4.9232267258468478e-17]
  },
  {
    x: 0.21593624783854753,
    expected: [0.21267086956116402, -8.8652198801021241e-18]
  },
  {
    x: -1.6086317805455328,
    expected: [-1.0146122942197242, 9.3839132936763128e-17]
  },
  {
    x: -0.34556199237727198,
    expected: [-0.3327156798085536, -1.4863520144868318e-17]
  },
  {
    x: 1.9745135672238543,
    expected: [1.1019989768885059, -1.012337153619269e-16]
  },
  {
    x: 2.0300581600168446,
    expected: [1.1130888592015413, -8.3248715025772548e-17]
  },
  {
    x: 0.41723197321644478,
    expected: [0.39527270432874473, -5.3892960364711704e-18]
  },
  {
    x: -1.2418969900777224,
    expected: [-0.89288069643019619, 3.3230564731364737e-17]
  },
  {
    x: 88.910783070936105,
    expected: [1.5595495713178127, 1.1065461364950002e-16]
  },
  {
    x: -0.3394106797434005,
    expected: [-0.32721015785042823, 2.00296516648974e-17]
  },
  {
    x: -1.3112434531014043,
    expected: [-0.91925781058310951, -8.2634621804631433e-18]
  },
  {
    x: -8.8553959334453829,
    expected: [-1.4583472036875591, -1.622427031910283e-17]
  }
];

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// theta_alt: the alternative result (if different) when +0 and -0 are not differentiated
// currently there's no portable way to tell +0 and -0 apart in wenyan
const TO_POLAR = [
  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // special cases
  {
    x: 0,
    y: 0,
    r: [0, 0],
    theta: [0, 0]
  },
  {
    x: -0,
    y: 0,
    r: [0, 0],
    theta: [3.1415926535897931, 1.2246467991473532e-16],
    theta_alt: [0, 0]
  },
  {
    x: -0,
    y: -0,
    r: [0, 0],
    theta: [-3.1415926535897931, -1.2246467991473532e-16],
    theta_alt: [0, 0]
  },
  {
    x: 0,
    y: -0,
    r: [0, 0],
    theta: [-0, -0],
    theta_alt: [0, 0]
  },
  {
    x: 1,
    y: 0,
    r: [1, 0],
    theta: [0, 0]
  },
  {
    x: 1,
    y: 1,
    r: [1.4142135623730951, -9.6672933134529135e-17],
    theta: [0.78539816339744828, 3.061616997868383e-17]
  },
  {
    x: 0,
    y: 1,
    r: [1, 0],
    theta: [1.5707963267948966, 6.123233995736766e-17]
  },
  {
    x: -0,
    y: 1,
    r: [1, 0],
    theta: [1.5707963267948966, 6.123233995736766e-17]
  },
  {
    x: -1,
    y: 1,
    r: [1.4142135623730951, -9.6672933134529135e-17],
    theta: [2.3561944901923448, 9.1848509936051484e-17]
  },
  {
    x: -1,
    y: 0,
    r: [1, 0],
    theta: [3.1415926535897931, 1.2246467991473532e-16]
  },
  {
    x: -1,
    y: -0,
    r: [1, 0],
    theta: [-3.1415926535897931, -1.2246467991473532e-16],
    theta_alt: [3.1415926535897931, 1.2246467991473532e-16]
  },
  {
    x: -1,
    y: -1,
    r: [1.4142135623730951, -9.6672933134529135e-17],
    theta: [-2.3561944901923448, -9.1848509936051484e-17]
  },
  {
    x: -0,
    y: -1,
    r: [1, 0],
    theta: [-1.5707963267948966, -6.123233995736766e-17]
  },
  {
    x: 0,
    y: -1,
    r: [1, 0],
    theta: [-1.5707963267948966, -6.123233995736766e-17]
  },
  {
    x: 1,
    y: -1,
    r: [1.4142135623730951, -9.6672933134529135e-17],
    theta: [-0.78539816339744828, -3.061616997868383e-17]
  },
  {
    x: 1,
    y: -0,
    r: [1, 0],
    theta: [-0, -0],
    theta_alt: [0, 0]
  },
  {
    x: Infinity,
    y: 0,
    r: [Infinity, Infinity],
    theta: [0, 0]
  },
  {
    x: Infinity,
    y: 1,
    r: [Infinity, Infinity],
    theta: [0, 0]
  },
  {
    x: Infinity,
    y: Infinity,
    r: [Infinity, Infinity],
    theta: [0.78539816339744828, 3.061616997868383e-17]
  },
  {
    x: 1,
    y: Infinity,
    r: [Infinity, Infinity],
    theta: [1.5707963267948966, 6.123233995736766e-17]
  },
  {
    x: 0,
    y: Infinity,
    r: [Infinity, Infinity],
    theta: [1.5707963267948966, 6.123233995736766e-17]
  },
  {
    x: -0,
    y: Infinity,
    r: [Infinity, Infinity],
    theta: [1.5707963267948966, 6.123233995736766e-17]
  },
  {
    x: -1,
    y: Infinity,
    r: [Infinity, Infinity],
    theta: [1.5707963267948966, 6.123233995736766e-17]
  },
  {
    x: -Infinity,
    y: Infinity,
    r: [Infinity, Infinity],
    theta: [2.3561944901923448, 9.1848509936051484e-17]
  },
  {
    x: -Infinity,
    y: 1,
    r: [Infinity, Infinity],
    theta: [3.1415926535897931, 1.2246467991473532e-16]
  },
  {
    x: -Infinity,
    y: 0,
    r: [Infinity, Infinity],
    theta: [3.1415926535897931, 1.2246467991473532e-16]
  },
  {
    x: -Infinity,
    y: -0,
    r: [Infinity, Infinity],
    theta: [-3.1415926535897931, -1.2246467991473532e-16],
    theta_alt: [3.1415926535897931, 1.2246467991473532e-16]
  },
  {
    x: -Infinity,
    y: -1,
    r: [Infinity, Infinity],
    theta: [-3.1415926535897931, -1.2246467991473532e-16]
  },
  {
    x: -Infinity,
    y: -Infinity,
    r: [Infinity, Infinity],
    theta: [-2.3561944901923448, -9.1848509936051484e-17]
  },
  {
    x: -1,
    y: -Infinity,
    r: [Infinity, Infinity],
    theta: [-1.5707963267948966, -6.123233995736766e-17]
  },
  {
    x: -0,
    y: -Infinity,
    r: [Infinity, Infinity],
    theta: [-1.5707963267948966, -6.123233995736766e-17]
  },
  {
    x: 0,
    y: -Infinity,
    r: [Infinity, Infinity],
    theta: [-1.5707963267948966, -6.123233995736766e-17]
  },
  {
    x: 1,
    y: -Infinity,
    r: [Infinity, Infinity],
    theta: [-1.5707963267948966, -6.123233995736766e-17]
  },
  {
    x: Infinity,
    y: -Infinity,
    r: [Infinity, Infinity],
    theta: [-0.78539816339744828, -3.061616997868383e-17]
  },
  {
    x: Infinity,
    y: -1,
    r: [Infinity, Infinity],
    theta: [-0, -0]
  },
  {
    x: Infinity,
    y: -0,
    r: [Infinity, Infinity],
    theta: [-0, -0],
    theta_alt: [0, 0]
  },
  {
    x: Infinity,
    y: NaN,
    r: [Infinity, Infinity],
    theta: [NaN, NaN]
  },
  {
    x: NaN,
    y: Infinity,
    r: [Infinity, Infinity],
    theta: [NaN, NaN]
  },
  {
    x: -Infinity,
    y: NaN,
    r: [Infinity, Infinity],
    theta: [NaN, NaN]
  },
  {
    x: NaN,
    y: -Infinity,
    r: [Infinity, Infinity],
    theta: [NaN, NaN]
  },
  {
    x: NaN,
    y: NaN,
    r: [NaN, NaN],
    theta: [NaN, NaN]
  },
  {
    x: 1,
    y: 1,
    r: [1.4142135623730951, -9.6672933134529135e-17],
    theta: [0.78539816339744828, 3.061616997868383e-17]
  },
  {
    x: -1,
    y: 1,
    r: [1.4142135623730951, -9.6672933134529135e-17],
    theta: [2.3561944901923448, 9.1848509936051484e-17]
  },
  {
    x: -1,
    y: -1,
    r: [1.4142135623730951, -9.6672933134529135e-17],
    theta: [-2.3561944901923448, -9.1848509936051484e-17]
  },
  {
    x: 1,
    y: -1,
    r: [1.4142135623730951, -9.6672933134529135e-17],
    theta: [-0.78539816339744828, -3.061616997868383e-17]
  },
  {
    x: Number.MIN_VALUE,
    y: Number.MIN_VALUE,
    r: [4.9406564584124654e-324, 0],
    theta: [0.78539816339744828, 3.061616997868383e-17]
  },
  {
    x: MIN_NORMAL_VALUE,
    y: MIN_NORMAL_VALUE,
    r: [3.1467296279827175e-308, -0],
    theta: [0.78539816339744828, 3.061616997868383e-17]
  },
  {
    x: Number.MAX_VALUE,
    y: Number.MAX_VALUE,
    r: [Infinity, Infinity],
    theta: [0.78539816339744828, 3.061616997868383e-17]
  },
  {
    x: 1,
    y: Number.MIN_VALUE,
    r: [1, 0],
    theta: [Number.MIN_VALUE, -0]
  },
  {
    x: Number.MAX_VALUE,
    y: 1,
    r: [Number.MAX_VALUE, 0],
    theta: [5.5626846462680035e-309, 0]
  },
  {
    x: Number.MAX_VALUE,
    y: Number.MIN_VALUE,
    r: [Number.MAX_VALUE, 0],
    theta: [0, 0]
  },

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // random cases (medium)
  {
    x: 4.343832046666694e-120,
    y: -1.0737591099084341e-120,
    r: [4.4745765694375948e-120, -2.9932572834685561e-136],
    theta: [-0.24233379010590309, 7.3019760917089208e-18]
  },
  {
    x: -6.6240874887939915e-117,
    y: -4.0069400868987249e-116,
    r: [4.0613241942238413e-116, -2.3195344942887507e-132],
    theta: [-1.7346299333667332, 9.5253322401265344e-17]
  },
  {
    x: 4.8469712863527371e-88,
    y: -3.027074441168972e-87,
    r: [3.0656338624965837e-87, 8.4618716949428332e-104],
    theta: [-1.4120234278790791, 8.500677736178688e-18]
  },
  {
    x: 1.6938473701288607e-96,
    y: 2.288183359519883e-96,
    r: [2.8469109575250426e-96, 1.3532803984201649e-112],
    theta: [0.93355893206924367, -1.7545409593113188e-17]
  },
  {
    x: -8.3231524435902625e-52,
    y: -3.1173339004162013e-51,
    r: [3.2265336373074606e-51, 1.4303466528428858e-67],
    theta: [-1.8317060311342295, -1.4286342802521636e-17]
  },
  {
    x: -513545.52196980733,
    y: 205205.98380498169,
    r: [553026.6710789022, -1.0826904645373444e-11],
    theta: [2.7614425810904941, -1.6131508754444361e-16]
  },
  {
    x: -1.1594247090236611e26,
    y: 2.7107874559251922e24,
    r: [1.1597415629172394e26, 4142762532.1766472],
    theta: [3.1182164597746476, -1.1273696418407277e-16]
  },
  {
    x: -2.3620709682335048e120,
    y: -3.7393441443143555e120,
    r: [4.4229033324943502e120, -2.7706848058528151e104],
    theta: [-2.1341852162277508, 1.365298572985304e-16]
  },
  {
    x: -2.5710561589146756e73,
    y: -8.7027347280377789e72,
    r: [2.7143517991887186e73, 4.7891031116633736e55],
    theta: [-2.8152094616958228, 1.2935480748958005e-16]
  },
  {
    x: 3.3616832895253212e-79,
    y: -4.9788143940090294e-80,
    r: [3.3983526107179783e-79, 1.2234548194595257e-95],
    theta: [-0.14703594031080233, -2.5158664443356076e-18]
  },
  {
    x: 5.9858686564247429e-110,
    y: -1.9664947070542159e-109,
    r: [2.0555796429698188e-109, 5.3690819197436564e-126],
    theta: [-1.2753143123636792, 5.2676863246791093e-17]
  },
  {
    x: -9.9145571031756267e34,
    y: -4.3180508139609438e35,
    r: [4.4304116352174402e35, -3.1798426043096243e17],
    theta: [-1.7964916516848703, -1.2162154043668133e-17]
  },
  {
    x: 4.8484602497133884e51,
    y: 1.3650077101315959e52,
    r: [1.448558496108877e52, -1.3074469844862738e36],
    theta: [1.2294995889451641, 1.2102175361136718e-17]
  },
  {
    x: -0.01069256086626569,
    y: 1.649966462824457e-5,
    r: [0.010692573596554261, -4.0789881691842285e-19],
    theta: [3.1400495572503315, 2.0571461715101898e-16]
  },
  {
    x: 3.4412133269210356e-98,
    y: -2.2535162304044467e-98,
    r: [4.1134273497990955e-98, -7.7980621079854917e-115],
    theta: [-0.57978482248973873, 9.414790916024923e-18]
  },
  {
    x: -9.5921719555332545e-81,
    y: 6.3653348016198265e-82,
    r: [9.6132688350990051e-81, 1.4394165235511952e-97],
    theta: [3.0753301224107132, -3.6970709600635743e-18]
  },
  {
    x: 2.7708317932281372e-24,
    y: 1.5229462800464561e-22,
    r: [1.5231983202426319e-22, -1.1165412152229426e-38],
    theta: [1.5526044433462034, -1.1021051303761159e-16]
  },
  {
    x: 2.2120182969672176e24,
    y: 4.3192150803520942e22,
    r: [2.2124399444976543e24, 99336748.512786448],
    theta: [0.019523646270364965, 1.6923244916239237e-18]
  },
  {
    x: 5.2601251475540062e128,
    y: 2.8582012421463715e128,
    r: [5.9865040640207633e128, 5.3642363770452627e111],
    theta: [0.49773978687957099, 2.1403677335049959e-17]
  },
  {
    x: -5.5225080755196726e57,
    y: -1.9309169185536872e59,
    r: [1.9317064880310582e59, -8.6628013780961864e42],
    theta: [-1.599388976142456, -5.8273848159436829e-17]
  },
  {
    x: -8.1175951671148493e-103,
    y: 2.4899986241355116e-102,
    r: [2.6189781711897495e-102, -7.5013203643561958e-119],
    theta: [1.8859396735216722, 8.1906027746676974e-17]
  },
  {
    x: -3.3767339203426006e26,
    y: -3.7055049368978292e24,
    r: [3.3769372285365394e26, 31393524805.285576],
    theta: [-3.1306194579065298, -4.5927827672252516e-17]
  },
  {
    x: 2.7259749605379549e127,
    y: 2.0030859715847266e128,
    r: [2.0215496047374964e128, -1.7364188264669029e112],
    theta: [1.4355384761652399, 4.7962767385437935e-17]
  },
  {
    x: -1.1603579777849931e133,
    y: 7.840708798735736e133,
    r: [7.9261052922088583e133, -2.8340408726021544e117],
    theta: [1.7177213600645287, 7.1187373750700535e-18]
  },
  {
    x: -8.8121238783907996e-85,
    y: -1.0373368307692786e-86,
    r: [8.8127344181650006e-85, 3.7375697758620881e-102],
    theta: [-3.1298214967896243, -2.1781404528172688e-16]
  },
  {
    x: -0.021302166136501974,
    y: 0.0012104759395165819,
    r: [0.021336530507729694, 1.2390949942102333e-19],
    theta: [3.0848296190569413, 8.2763250433085876e-17]
  },
  {
    x: 5.3258728986649999e114,
    y: -1.3453914715071843e115,
    r: [1.4469718148366298e115, -2.6023763793847891e98],
    theta: [-1.1938636026139076, 4.0515366771305916e-17]
  },
  {
    x: -1.9712683341853258e43,
    y: 4.4027258323257717e42,
    r: [2.0198363282474339e43, 9.2331299655412183e26],
    theta: [2.9218541869488495, -1.1762716438035044e-16]
  },
  {
    x: -1.9429361933764761e54,
    y: -5.1113877148784644e55,
    r: [5.1150791178950311e55, 4.1580517555407752e39],
    theta: [-1.6087899466449427, 5.7464307729667918e-17]
  },
  {
    x: -9.1764185667169654e59,
    y: 1.4296699675613206e61,
    r: [1.4326119090381548e61, 2.0353129002002997e44],
    theta: [1.6348939731094143, 5.4889529269876933e-17]
  },
  {
    x: 2.2965832781225871e-125,
    y: -4.5704916379243172e-126,
    r: [2.3416209538427967e-125, 7.9884627344255867e-142],
    theta: [-0.19644602145285639, 7.7034276021160164e-18]
  },
  {
    x: 3.7448493980382294e-15,
    y: -1.064613694901296e-14,
    r: [1.128557171574069e-14, 7.6915714588505648e-31],
    theta: [-1.2325574269617208, 7.6972096017994123e-17]
  },
  {
    x: -1.5526574654086043e-111,
    y: 1.3932367279506909e-111,
    r: [2.0861097250623753e-111, -1.57266432560304e-127],
    theta: [2.4102580020008015, 1.7648221717317503e-16]
  },
  {
    x: 1.6180353819594872e82,
    y: 7.9878357736695114e81,
    r: [1.8044649347504451e82, -9.5401427027608017e65],
    theta: [0.45857479845509647, -1.0637898507376098e-17]
  },
  {
    x: 2.8494654071380598e82,
    y: -5.6102085522857627e82,
    r: [6.2923678457808544e82, -6.3455878378695267e66],
    theta: [-1.1008429731671359, 9.4189458020188903e-17]
  },
  {
    x: 4.1301544489487074e-15,
    y: 7.9766697708591921e-15,
    r: [8.9825072449461261e-15, -4.0109589476277501e-31],
    theta: [1.093026659585663, 2.6035614092291773e-18]
  },
  {
    x: -4.2734008997577858e-86,
    y: 2.0518179983326868e-87,
    r: [4.2783238331189324e-86, -2.9317673351983162e-102],
    theta: [3.0936157956335122, -5.3217726469481825e-17]
  },
  {
    x: 4.8027924311625131e82,
    y: -3.2684308179249398e81,
    r: [4.813900864885726e82, -3.245819835031446e66],
    theta: [-0.067947954922895917, -1.6696819128162177e-18]
  },
  {
    x: -1.2483268611700777e97,
    y: -3.8985992508534216e95,
    r: [1.2489354907002259e97, -7.7495988370161298e80],
    theta: [-3.1103722047352429, -1.8397659247983845e-16]
  },
  {
    x: 1.2993380551741468e90,
    y: -1.3922023660157251e90,
    r: [1.9043389429309891e90, 3.0891457112551949e73],
    theta: [-0.81988677356235673, 2.230732283406127e-17]
  },
  {
    x: 1.8171771058135377e-35,
    y: -5.0234786493328069e-33,
    r: [5.0235115162171121e-33, 2.7663199852711423e-49],
    theta: [-1.5671789745444129, -3.7648098869838389e-17]
  },
  {
    x: -8.0495671124648465e-120,
    y: -2.1454637138824106e-121,
    r: [8.0524257738616572e-120, -8.1187205059234022e-137],
    theta: [-3.1149458058629813, 3.5486581646069222e-17]
  },
  {
    x: 1.5260771185913837e-117,
    y: -1.3739341004234624e-117,
    r: [2.0534376747772524e-117, -1.5355372886274391e-134],
    theta: [-0.73298330952241753, 4.4785284411866165e-17]
  },
  {
    x: 1.2416513712835154e48,
    y: 5.8343503495581448e46,
    r: [1.2430213562969757e48, 2.0360232819611483e31],
    theta: [0.046954098505952106, -2.7047990296092906e-19]
  },
  {
    x: 5.1420773535238052e37,
    y: 7.8924146157130713e36,
    r: [5.2022938781162293e37, -2.8205849583776946e21],
    theta: [0.15229835237515466, -1.0076095716534889e-17]
  },
  {
    x: -97563328.958798468,
    y: -123157345.11619732,
    r: [157118855.69082043, 3.2780677587945509e-9],
    theta: [-2.2407534644383085, 9.3507730135631818e-17]
  },
  {
    x: -1.2837206621451554e55,
    y: 2.1870309880865939e56,
    r: [2.1907952734646856e56, 1.7426196333392138e40],
    theta: [1.62942601369064, 1.0304012203455303e-16]
  },
  {
    x: -1.4145232491531768e-14,
    y: 7.1593304572469038e-14,
    r: [7.297731744758643e-14, -5.1654373608816559e-30],
    theta: [1.7658615637439576, -5.4210118760820202e-17]
  },
  {
    x: -1.0351149743845508e-129,
    y: -1.2351120571772193e-128,
    r: [1.2394419808472255e-128, -8.3756897067976814e-145],
    theta: [-1.6544083110630479, 1.8648438570423318e-17]
  },
  {
    x: 4.2377996388008653e28,
    y: -6.813974283305334e28,
    r: [8.0242875890740091e28, 7590433974690.4004],
    theta: [-1.0144093269034054, 4.732120060511198e-18]
  },
  {
    x: 1.3091076617468801e-130,
    y: -4.5625431770446251e-129,
    r: [4.5644208691899681e-129, 2.0441125654507697e-145],
    theta: [-1.5421116975607203, -8.7949950457517977e-17]
  },
  {
    x: -2.2780238016648704e-14,
    y: 7.7882508650371058e-15,
    r: [2.4074802089153676e-14, -1.3563953192254522e-30],
    theta: [2.8121642975361332, -1.298131821422359e-16]
  },
  {
    x: -2.3745458988604514e-40,
    y: -2.0251055306627901e-41,
    r: [2.3831656992114918e-40, 7.0514480632299691e-57],
    theta: [-3.0565146147308058, 1.4852340444917661e-16]
  },
  {
    x: 2.0401686879913354e-131,
    y: 3.678325869065702e-130,
    r: [3.6839793812930813e-130, 1.1205278664539042e-146],
    theta: [1.5153884988358706, 8.3523910815563068e-17]
  },
  {
    x: 2.3924302522478812e73,
    y: 6.0816232670145254e74,
    r: [6.0863272001274413e74, -7.0492138670358703e57],
    theta: [1.5314779216359478, -4.4803767256176858e-17]
  },
  {
    x: -6.6546611756108301e109,
    y: 4.9016195013419881e111,
    r: [4.9020712140351756e111, -1.6026292644769445e95],
    theta: [1.5843719467637407, -8.440151966500995e-18]
  },
  {
    x: 1.85428500713408e-51,
    y: 2.5115814001379714e-52,
    r: [1.8712170635651613e-51, 1.2263955885902356e-67],
    theta: [0.13462812409447469, 3.0519914476214239e-18]
  },
  {
    x: -2.7228081015747044e-40,
    y: 4.3019613697318196e-39,
    r: [4.3105693900278281e-39, 5.0553706640595783e-56],
    theta: [1.6340042640138883, 6.7297538423887654e-17]
  },
  {
    x: 1.0103520941529884e99,
    y: 1.4330764096549448e99,
    r: [1.7534307371746499e99, -4.0258826149466934e82],
    theta: [0.95670704730336498, 6.136471647920979e-18]
  },
  {
    x: -1.4034411450451183e121,
    y: -1.2792285425807737e121,
    r: [1.8989662218583254e121, 7.9292302235327516e104],
    theta: [-2.4024633067114558, 1.1698025194403581e-16]
  },
  {
    x: 6.4659865532902324e94,
    y: 7.0490500455058395e94,
    r: [9.5654633265397019e94, -8.6933894564962945e77],
    theta: [0.82851326377400558, 3.2395347804204794e-17]
  },
  {
    x: -2.1835876053668822e26,
    y: -2.6838360381480886e26,
    r: [3.4599177316772006e26, -22118627966.450474],
    theta: [-2.2537792843809581, -2.0732949782209938e-16]
  },
  {
    x: -3.6962349433227219e-89,
    y: 5.4856133533916097e-90,
    r: [3.7367194562703e-89, 3.2816995462974153e-105],
    theta: [2.9942572571693442, 6.6237148457741075e-17]
  },
  {
    x: -1.7807259273092656e-60,
    y: 7.1772906272785371e-60,
    r: [7.3948959138456968e-60, -1.8378122892143879e-76],
    theta: [1.8139912228059301, -7.6872508600994599e-17]
  },
  {
    x: -7.9859335367195778e-136,
    y: -5.8678906107181976e-135,
    r: [5.9219837524163979e-135, 5.0851551734684246e-151],
    theta: [-1.7060607643676269, -5.4137995880722162e-18]
  },
  {
    x: 2.9455977674360493e-43,
    y: -8.3132550587909556e-43,
    r: [8.8196800327470874e-43, -7.5858224900777303e-59],
    theta: [-1.2302733166139972, -4.7000981305860456e-17]
  },
  {
    x: -1.530274055130143e-8,
    y: 1.9858893467940839e-7,
    r: [1.9917765649159239e-7, 3.4327712137669278e-24],
    theta: [1.6477017174768529, -6.1382600428042939e-17]
  },
  {
    x: -1.3980704153176505e54,
    y: -1.3548545393640772e53,
    r: [1.4046199466100508e54, 4.6999536764433162e37],
    theta: [-3.044985432132409, 2.292429487034005e-17]
  },
  {
    x: -1.2308704439154451e-60,
    y: -8.5425524563274663e-61,
    r: [1.4982636865370758e-60, 8.875106681544537e-77],
    theta: [-2.5348878112315161, 1.8868703975684941e-16]
  },
  {
    x: 6.078673443507841e-138,
    y: 3.6595801076027437e-139,
    r: [6.0896794741962481e-138, -1.5742648997426183e-154],
    theta: [0.060131020062262834, -1.9253549667269743e-18]
  },
  {
    x: 1.0831027483786279e123,
    y: -2.4071550231330374e122,
    r: [1.1095294122281227e123, -5.3764638943364261e106],
    theta: [-0.21869182356715985, 1.2612080760975658e-17]
  },
  {
    x: -8.8319889084614125e23,
    y: -2.7612651577079045e23,
    r: [9.253573004540304e23, 11549285.802190293],
    theta: [-2.8385769302431574, -8.9467938584671792e-17]
  },
  {
    x: -4.6312199424134414e72,
    y: 3.9633736412753728e73,
    r: [3.990339910572342e73, 1.1141291457721513e57],
    theta: [1.6871192654506548, 7.9410351665529539e-17]
  },
  {
    x: -1.821750294467126e-52,
    y: 7.7207475053229599e-53,
    r: [1.978603941116202e-52, 1.3294612194025966e-68],
    theta: [2.7407309563224995, -1.8532535715332469e-16]
  },
  {
    x: 1.2013565913346326e109,
    y: -2.8314507080913435e109,
    r: [3.0757715734257866e109, -1.9859254573996853e93],
    theta: [-1.169527098554775, 4.6639704105119052e-18]
  },
  {
    x: 358764137.41383368,
    y: 614140.79822929122,
    r: [358764663.06370276, 2.0120952950649313e-8],
    theta: [0.0017118215961527739, -7.55966377331274e-21]
  },
  {
    x: -2.9438210796536166e17,
    y: 1.2911298856867858e18,
    r: [1.324264779869835e18, -65.320887571945178],
    theta: [1.7949676799062597, 4.7441295575079281e-17]
  },
  {
    x: -15425.713756385419,
    y: 20939.382753029491,
    r: [26007.891013532935, 1.3790806274617099e-12],
    theta: [2.2057207547148452, 7.9301710588860953e-17]
  },
  {
    x: 8.3824811990206727e-115,
    y: 1.762609359768261e-113,
    r: [1.7646014717912575e-113, 1.2397874893682372e-129],
    theta: [1.5232749052701371, 9.8642353453617803e-17]
  },
  {
    x: -5.4378375964435557e-90,
    y: -2.8261142946460348e-90,
    r: [6.1283765983902855e-90, -3.5553766291372141e-106],
    theta: [-2.6622993875445697, -3.9713242020796124e-17]
  },
  {
    x: -6.5969990102723777e-28,
    y: -4.5693656572606462e-28,
    r: [8.0249298097421232e-28, -6.5217123426981494e-45],
    theta: [-2.5358213092233775, -1.6676882117484472e-16]
  },
  {
    x: 1.1624301899481803e-116,
    y: 1.9462205437751662e-114,
    r: [1.9462552580294173e-114, 6.1456527578805823e-131],
    theta: [1.5648236410621026, -7.9291341964741185e-18]
  },
  {
    x: 6.7970730732459801e-70,
    y: 1.0639363411847143e-71,
    r: [6.7979057045847948e-70, -5.1127707534158147e-86],
    theta: [0.015651581939624834, 3.5682842522968619e-19]
  },
  {
    x: 1.4828556428259111e-111,
    y: 6.9122961674772833e-110,
    r: [6.913886527525292e-110, 3.371391277097879e-126],
    theta: [1.5493471846248357, 2.5811969335652034e-17]
  },
  {
    x: -5.4908267437218385e90,
    y: 8.3617843509508525e90,
    r: [1.0003430204753644e91, -1.8727463847587473e74],
    theta: [2.1518373208672927, 9.9786735259434374e-17]
  },
  {
    x: -3.6872387994582803e-133,
    y: 1.2025165501084775e-132,
    r: [1.2577771475611648e-132, -3.074800449614267e-149],
    theta: [1.8683216708827539, 9.7734439572657841e-17]
  },
  {
    x: 9.3928910363089989e-62,
    y: -2.7751734983881296e-61,
    r: [2.9298211492095467e-61, 1.1054916646106031e-77],
    theta: [-1.2444376355715976, 9.509617179697619e-17]
  },
  {
    x: 2.8175537938955246e-5,
    y: 1.7161803820509742e-6,
    r: [2.8227756078959643e-5, -5.6452302394391625e-22],
    theta: [0.060835137129940403, 2.2074564022835883e-18]
  },
  {
    x: 7.5198577016135996e133,
    y: -8.0831674623120174e134,
    r: [8.118071126955274e134, 3.6655307576191236e117],
    theta: [-1.4780322530681598, 8.8132578791714021e-17]
  },
  {
    x: 4.3510003264306224e74,
    y: -1.6421159411513361e74,
    r: [4.650564331861535e74, -4.28815952670407e58],
    theta: [-0.36088285844508461, 1.1445778285265296e-17]
  },
  {
    x: -4.0947843151563649e-131,
    y: -4.9905367256374089e-134,
    r: [4.0947873562747298e-131, -5.8566294396636469e-148],
    theta: [-3.1403738997139787, -7.8560176444595635e-17]
  },
  {
    x: 1.5804802458207369e-50,
    y: 2.3849344252593733e-49,
    r: [2.3901655572076076e-49, -7.831068260656142e-66],
    theta: [1.5046237444036332, 3.8769020112381621e-17]
  },
  {
    x: 1.7977284728176442e-45,
    y: 1.9581996620859664e-45,
    r: [2.6582651445205483e-45, 1.5523874384512859e-61],
    theta: [0.82809697141310357, 2.1391696675631178e-17]
  },
  {
    x: -7.9718371092053112e-102,
    y: 5.1457372915546749e-104,
    r: [7.9720031834495818e-102, -2.8087286094024635e-118],
    theta: [3.1351378480587915, 1.0605356423231649e-16]
  },
  {
    x: 73047625500.010254,
    y: -214784212115.09662,
    r: [226866069223.87616, -9.324943381472032e-6],
    theta: [-1.2429702090246071, -5.995511602356906e-17]
  },
  {
    x: 1.3127228365859149e-137,
    y: -9.0934616647798766e-138,
    r: [1.5969194394778913e-137, 1.9133302888319461e-154],
    theta: [-0.60582168419285698, -1.3842890961610973e-17]
  },
  {
    x: -2.2934566463510759e-35,
    y: 7.3341493416331851e-36,
    r: [2.4078706058145463e-35, -2.1120228268897309e-51],
    theta: [2.8320839984583714, -1.9985223362073582e-17]
  },
  {
    x: 6.4980122654416418e-15,
    y: 3.0371225607139328e-15,
    r: [7.172745419337534e-15, -1.3342941355938472e-31],
    theta: [0.43722307086609669, 2.1461477305166206e-17]
  },
  {
    x: 1.0158925439179017e28,
    y: 4.275445294922292e28,
    r: [4.3944817818101317e28, 867717480075.31006],
    theta: [1.3375115193298948, -5.7521694955045959e-17]
  },
  {
    x: -7.4791577971716203e113,
    y: -1.275907526733952e114,
    r: [1.4789584275179207e114, 9.922598262983264e97],
    theta: [-2.1009945932422598, 1.2426822232439584e-16]
  },

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // random cases (large)
  {
    x: -3.4994950106509834e183,
    y: 4.2153345778232423e182,
    r: [3.5247915946337949e183, -2.207675781943598e167],
    theta: [3.0217147075959594, -2.0624738673845311e-16]
  },
  {
    x: 3.3659571994842743e272,
    y: 2.8325537832356644e272,
    r: [4.3992077472748084e272, -2.7271527732605602e255],
    theta: [0.69955616297338741, -3.7655332371758458e-17]
  },
  {
    x: -3.7403009152369655e179,
    y: 7.2575403744111608e178,
    r: [3.8100616608375988e179, 1.482367314597617e163],
    theta: [2.9499379707716411, -1.6554145183126841e-17]
  },
  {
    x: 3.7428698444662094e260,
    y: -4.0550530180056594e262,
    r: [4.0552257503502894e262, 1.0297284538875333e245],
    theta: [-1.5615664510288849, 8.4937509089872165e-17]
  },
  {
    x: 6.8565305462846955e191,
    y: 2.7971920966880226e191,
    r: [7.4051532568819296e191, -5.7845994617149635e175],
    theta: [0.38734979256472524, 2.2399404596935012e-17]
  },
  {
    x: -2.4527116320314416e206,
    y: 3.034921789284276e206,
    r: [3.9021205282480458e206, 1.9171307454327303e190],
    theta: [2.2504949528311311, -1.4709679171812596e-16]
  },
  {
    x: 6.2039147613570434e296,
    y: -3.4293398504322689e297,
    r: [3.4850046475470664e297, 2.7296029079957313e281],
    theta: [-1.3918250227922613, -9.9642777945650287e-17]
  },
  {
    x: 3.7230786751234486e205,
    y: 2.0539596080180011e204,
    r: [3.7287400448238097e205, 2.2074915117145488e189],
    theta: [0.055112443569488995, 1.2344135725471189e-18]
  },
  {
    x: 6.3508033953474795e287,
    y: 4.2325839230083717e288,
    r: [4.2799642174873973e288, -6.6437413818463151e271],
    theta: [1.421861841767819, -2.9438877270859236e-17]
  },
  {
    x: 2.7822528967930942e240,
    y: 1.1130766173795929e240,
    r: [2.9966432450111177e240, -1.0235419270374108e224],
    theta: [0.38056074103391685, 6.7299715508499182e-18]
  },

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // random cases (small)
  {
    x: -1.1309822910708444e-163,
    y: -2.7913220257555943e-164,
    r: [1.1649187650778655e-163, 6.72647436552702e-180],
    theta: [-2.8996232039701981, -1.0769780150428439e-16]
  },
  {
    x: -5.8953955078223702e-258,
    y: 1.2699750098899189e-257,
    r: [1.4001404956937077e-257, -2.3519322844417819e-274],
    theta: [2.0054071363502683, 1.8684741655121139e-16]
  },
  {
    x: -6.7930517597967744e-297,
    y: -1.2918190493540632e-296,
    r: [1.4595382757525805e-296, 5.6664601483395376e-313],
    theta: [-2.0549107262557729, 1.2761363290826602e-16]
  },
  {
    x: -4.7803415395073113e-280,
    y: 2.8597026340916983e-278,
    r: [2.8601021523635188e-278, -2.2561660942902872e-294],
    theta: [1.5875109890016119, 3.9092203787059553e-17]
  },
  {
    x: 7.9412874108260295e-306,
    y: -2.7275385703663808e-304,
    r: [2.7286943869569593e-304, -1.7233009726942679e-320],
    theta: [-1.5416893337509849, -7.4462085231414676e-17]
  },
  {
    x: -2.4925869478177906e-189,
    y: -4.7844985731296042e-190,
    r: [2.5380906127233521e-189, 5.5947620701791565e-206],
    theta: [-2.951950178431467, 1.0937216302700279e-16]
  },
  {
    x: 2.5242689626386231e-188,
    y: -1.2274756452182263e-189,
    r: [2.5272516218882341e-188, -3.4615196089417527e-205],
    theta: [-0.048588702093400375, 1.3227889099289141e-19]
  },
  {
    x: -1.9371536285175586e-162,
    y: 2.8471896964438313e-162,
    r: [3.4436976272626872e-162, -2.2365634362311087e-178],
    theta: [2.1682286330159184, -8.8044331036791398e-19]
  },
  {
    x: -5.7273134891500507e-229,
    y: 9.4236020097002603e-230,
    r: [5.8043227470026508e-229, -2.3835691976502632e-245],
    theta: [2.978515909530226, 1.6797191180490761e-16]
  },
  {
    x: 3.658160554096941e-202,
    y: 7.7428946076442737e-201,
    r: [7.7515313513835624e-201, 8.991536071391701e-218],
    theta: [1.5235860449437504, 6.5099560138843506e-17]
  },

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // random cases (huge)
  {
    x: -1.3463675355292842e308,
    y: -1.233990318785634e308,
    r: [Infinity, Infinity],
    theta: [-2.3997180072898492, -3.5840286520572935e-17]
  },
  {
    x: -1.337534028763891e308,
    y: 2.1367114908943617e307,
    r: [1.3544934987125501e308, 9.2595250922866347e291],
    theta: [2.9831810965049477, -1.6389134220287903e-16]
  },
  {
    x: -3.4576065313162491e307,
    y: -5.5569079360510307e307,
    r: [6.5447894339808753e307, 3.4037326994276338e291],
    theta: [-2.1273923920369149, -1.6297403085203772e-16]
  },
  {
    x: 8.6822241354635338e307,
    y: 5.6848910439326798e307,
    r: [1.037781297383083e308, -1.3687312967625939e291],
    theta: [0.57972367744698927, 3.1102727585785405e-17]
  },
  {
    x: 7.7110277848320301e307,
    y: 7.2243521758961894e307,
    r: [1.0566513798780919e308, -8.7242493073123365e290],
    theta: [0.75282427055989365, -9.6254228949533336e-19]
  },
  {
    x: -4.0718595434987069e307,
    y: -1.4137930304549556e308,
    r: [1.4712617491061275e308, 3.9523439108402706e291],
    theta: [-1.8512167727036566, 9.4081402873101082e-17]
  },
  {
    x: 1.4454047634764849e308,
    y: -1.4635261388374965e308,
    r: [Infinity, Infinity],
    theta: [-0.79162764823569309, -5.2746531517924776e-17]
  },
  {
    x: -1.9069425798790883e307,
    y: -1.2740528089330772e308,
    r: [1.2882448757824823e308, -3.5865939566446696e291],
    theta: [-1.7193687208543973, 6.8730986091468532e-17]
  },
  {
    x: 1.1807430173631955e308,
    y: 1.2753733665058835e308,
    r: [1.7380251140430894e308, 5.224065401421711e291],
    theta: [0.82390756263768117, -1.8231431134082862e-17]
  },
  {
    x: 1.2525307702511706e308,
    y: -2.0371305590209204e306,
    r: [1.2526964199347902e308, 1.5388493378605878e291],
    theta: [-0.016262682037970731, -7.8702921409091447e-19]
  },
  {
    x: -5.0212379880992601e307,
    y: 1.7484677485762185e308,
    r: [Infinity, Infinity],
    theta: [1.8504499370963363, 6.960499452929821e-17]
  },
  {
    x: 1.1236487870323354e308,
    y: -1.4075847924764606e308,
    r: [Infinity, Infinity],
    theta: [-0.89710417800437214, 5.2992637692445871e-17]
  },
  {
    x: 3.0323312136879636e307,
    y: -1.5056456386039036e308,
    r: [1.5358773111619366e308, -8.1878050314241457e291],
    theta: [-1.3720574720616976, 1.775583568187124e-17]
  },
  {
    x: 1.1132218124963809e308,
    y: -7.3844032860736697e307,
    r: [1.3358730937972678e308, -4.1201379123577271e291],
    theta: [-0.58569335140278822, 1.4357486877584555e-17]
  },
  {
    x: -7.9094817295600884e307,
    y: 6.6409041478742498e306,
    r: [7.9373117180351047e307, -2.2954160832200096e291],
    theta: [3.0578278124973242, 2.1295919612285052e-16]
  },
  {
    x: 8.3540991542919361e307,
    y: 8.5222627851293429e307,
    r: [1.1933982388898593e308, 9.3273152431498519e291],
    theta: [0.79536228161821099, 3.2932119470523377e-17]
  },
  {
    x: -1.8052752915110952e307,
    y: -4.3460717072375515e307,
    r: [4.7060979763059752e307, -1.7272545186553923e290],
    theta: [-1.964491404527605, 3.0405400246229934e-17]
  },
  {
    x: -1.7487689975544705e308,
    y: 1.4375351906176116e308,
    r: [Infinity, Infinity],
    theta: [2.4535642257097394, 1.2209138024211472e-16]
  },
  {
    x: -2.1162337737137351e307,
    y: 4.9729877756525417e307,
    r: [5.404540017595974e307, 2.270661895255556e290],
    theta: [1.97312913192495, 5.089020912473339e-17]
  },
  {
    x: -7.591079781973949e306,
    y: 2.204366615571277e307,
    r: [2.3314109672917178e307, -1.4106751249880296e291],
    theta: [1.9024428227027186, -6.4186981725568349e-17]
  },
  {
    x: -9.3361821388599851e307,
    y: 5.4165426152222733e307,
    r: [1.079366623684868e308, 6.5912461238325501e290],
    theta: [2.6158840802241659, -4.2254450934504833e-17]
  },
  {
    x: 1.8524960416738332e307,
    y: -2.6881004724347411e306,
    r: [1.8718975468535288e307, 8.3335650859341776e290],
    theta: [-0.14410116607892859, 9.3819427190585192e-18]
  },
  {
    x: 5.6049843914327975e306,
    y: 7.0772861377615686e307,
    r: [7.0994462865799689e307, 3.0065352904391303e291],
    theta: [1.491764480663496, -2.0920062516980213e-17]
  },
  {
    x: 5.0258497281806765e307,
    y: 2.4322518409438696e306,
    r: [5.0317317079144366e307, -4.830700166395033e291],
    theta: [0.048357109928863225, -3.2737718222572178e-18]
  },
  {
    x: -1.1066630616646812e308,
    y: 6.7167414586438138e307,
    r: [1.2945459784324744e308, -6.4818794920799323e291],
    theta: [2.5960884293916706, -1.8730970232086209e-17]
  },
  {
    x: 7.8633093941484259e307,
    y: 1.7748967288763117e307,
    r: [8.0611347232432924e307, 2.0425068337497408e291],
    theta: [0.221998497303348, 1.1439341830984197e-17]
  },
  {
    x: 2.4275674339540746e307,
    y: -6.7079119707540276e307,
    r: [7.1336643216357997e307, -1.4853800902401207e291],
    theta: [-1.2235631694182445, 6.6039552823834073e-17]
  },
  {
    x: 8.2008323249277599e307,
    y: -3.3190034565523125e307,
    r: [8.8470014562102476e307, 2.2557100843842571e291],
    theta: [-0.38456478959205426, -4.8569479516198906e-18]
  },
  {
    x: -1.0673395293078938e308,
    y: -5.3642790467438112e307,
    r: [1.1945578963518442e308, -4.4345133570036278e291],
    theta: [-2.6758798812411499, -7.8521713345992003e-17]
  },
  {
    x: -9.3894340520505127e307,
    y: -2.9343119467574187e307,
    r: [9.8372586841400592e307, 6.7535937580505547e291],
    theta: [-2.8386967430061492, -6.0108614893938447e-17]
  },
  {
    x: -6.3231207640135463e307,
    y: -2.4268668690465667e307,
    r: [6.7728530913031871e307, 8.4122898853511719e290],
    theta: [-2.7751220007631394, -1.7488492151221176e-16]
  },
  {
    x: -8.9255244604719941e307,
    y: -1.6023901043935018e308,
    r: [Infinity, Infinity],
    theta: [-2.0790080052864068, -1.3854006103524819e-16]
  },
  {
    x: -6.0159888842131905e306,
    y: 1.4640183016871703e308,
    r: [1.4652538346308751e308, 1.6669797458668176e291],
    theta: [1.61186552756252, 6.8410252177083735e-17]
  },
  {
    x: 8.7927027811275421e306,
    y: -1.072929497494951e308,
    r: [1.0765262973167413e308, 5.7238964124453143e290],
    theta: [-1.4890286227402927, 7.7079565098397534e-17]
  },
  {
    x: 9.9939960530421976e307,
    y: -3.6055461342724561e307,
    r: [1.0624496224978862e308, -5.7969278486324518e291],
    theta: [-0.3462381486820833, -1.9528545475308174e-17]
  },
  {
    x: 2.0664678335536971e307,
    y: -1.2291984610220676e308,
    r: [1.246447652190071e308, 5.1524321221687988e291],
    theta: [-1.4042387254918183, -8.368114999512611e-17]
  },
  {
    x: 1.5054120039960057e308,
    y: -1.3265317548084224e308,
    r: [Infinity, Infinity],
    theta: [-0.72231678499570195, 3.104193863757612e-17]
  },
  {
    x: 5.1855401578745766e306,
    y: -1.6374961646522263e308,
    r: [1.6383170242427574e308, 5.9987073975108783e291],
    theta: [-1.5391394111542742, 9.2780089876640123e-17]
  },
  {
    x: 7.98353124212149e307,
    y: -8.7369250912787893e307,
    r: [1.1835143900457941e308, -4.7955030136519471e291],
    theta: [-0.83042591843913061, 4.4908210319194016e-17]
  },
  {
    x: 9.7411018619152431e307,
    y: -1.5565293965967123e308,
    r: [Infinity, Infinity],
    theta: [-1.0116061997137458, 7.5747214713858401e-17]
  },
  {
    x: -9.5596343012967631e307,
    y: 1.4833445367344028e308,
    r: [1.7647031179224161e308, -5.8465967703097935e291],
    theta: [2.1432705657305822, 1.6215156513800586e-16]
  },
  {
    x: -6.9899405825933071e307,
    y: -1.4794981370928522e307,
    r: [7.1448011928846613e307, 1.759473106019815e291],
    theta: [-2.9330101039207204, 6.8739503994083646e-17]
  },
  {
    x: -1.0914372615692356e308,
    y: -6.3097935390467693e307,
    r: [1.2607022808719415e308, -4.9969615607618143e291],
    theta: [-2.6174183900183392, 1.3074057312439152e-16]
  },
  {
    x: -9.1776418218638134e306,
    y: -1.1144760642453084e308,
    r: [1.118248545144037e308, -5.5554975243233092e291],
    theta: [-1.6529603166947386, 8.957367440278167e-17]
  },
  {
    x: 7.2848786382013108e306,
    y: -1.3224866712910889e308,
    r: [1.3244915784631916e308, 3.6136370705306179e291],
    theta: [-1.5157672368768529, -4.4386193616886779e-17]
  },
  {
    x: -1.639063158162236e308,
    y: -1.7538769740363595e308,
    r: [Infinity, Infinity],
    theta: [-2.3223683636440984, 5.5083064826178446e-17]
  },
  {
    x: 2.7683029904671086e307,
    y: 9.54974279733713e307,
    r: [9.9428913773771823e307, 3.7561102590959983e291],
    theta: [1.2886473245442165, 1.0415361946753791e-16]
  },
  {
    x: -1.7387890439833691e308,
    y: 8.7219633397645993e306,
    r: [1.7409751876252052e308, -5.0701700210262903e291],
    theta: [3.0914735251759184, -4.4665157302469109e-17]
  },
  {
    x: -1.4277168337003148e308,
    y: -5.4230888806770285e307,
    r: [1.5272440169496427e308, 2.9788919699378518e291],
    theta: [-2.7785824471256557, -8.2738205095271118e-17]
  },
  {
    x: -4.3068838566235081e307,
    y: -5.9942482835879551e307,
    r: [7.3810745179642599e307, -1.9438898254525713e291],
    theta: [-2.1938326065233373, -9.9894327495579437e-17]
  },

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // random cases (subnormal)
  {
    x: 7.6086109459551968e-321,
    y: -6.9169190417774516e-323,
    r: [7.6086109459551968e-321, 0],
    theta: [-0.0090906586650598177, 5.6395392283517486e-19]
  },
  {
    x: 5.3205948004055702e-309,
    y: 2.786508168495555e-308,
    r: [2.8368494960772029e-308, 0],
    theta: [1.3821260384795604, -1.0744829213909251e-16]
  },
  {
    x: 1.0071628650311227e-309,
    y: -1.4380907145029134e-310,
    r: [1.0173780446466766e-309, -0],
    theta: [-0.14182764003512977, -4.537962874728948e-18]
  },
  {
    x: 3.0325071582235715e-312,
    y: 3.1116904416708468e-312,
    r: [4.3449645648101864e-312, 0],
    theta: [0.79828493971202741, 6.1577548326243527e-18]
  },
  {
    x: 1.0480896652416423e-307,
    y: 2.6606919966774886e-308,
    r: [1.0813347147845454e-307, 4.9406564584124654e-324],
    theta: [0.24860932909487898, -4.9880077067348224e-18]
  },
  {
    x: 4.5874871627196199e-308,
    y: -1.0189645377406066e-307,
    r: [1.1174699610522429e-307, -9.8813129168249309e-324],
    theta: [-1.1477672137591413, -7.5085042598496824e-17]
  },
  {
    x: 2.3550523337122508e-315,
    y: -8.8413072520639007e-316,
    r: [2.515543407646489e-315, -0],
    theta: [-0.35913771394005228, 1.8462205556852401e-17]
  },
  {
    x: -1.6875844878583805e-312,
    y: -2.0109374443229027e-312,
    r: [2.6252258585937787e-312, 0],
    theta: [-2.268988611390323, 1.9443692311138078e-16]
  },
  {
    x: 7.6715999006811248e-313,
    y: 2.4579335318201766e-313,
    r: [8.0557359864190187e-313, 0],
    theta: [0.31006018194486235, -1.9116446415850508e-18]
  },
  {
    x: 1.3339772437713657e-322,
    y: 1.0869444208507424e-322,
    r: [1.7292297604443629e-322, -0],
    theta: [0.68370931163437132, -4.8264113911053047e-17]
  }
];

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const EXP = [
  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // special cases
  {
    x: -Infinity,
    expected: [0, 0]
  },
  {
    x: -Number.MAX_VALUE,
    expected: [0, 0]
  },
  {
    x: -745.13321910194122,
    expected: [0, 0]
  },
  {
    x: -745.13321910194111,
    expected: [4.9406564584124654e-324, -0]
  },
  {
    x: -744.44007192138133,
    expected: [4.9406564584124654e-324, -0]
  },
  {
    x: -744.44007192138122,
    expected: [4.9406564584124654e-324, 0]
  },
  {
    x: -708.39641853226419,
    expected: [2.2250738585070097e-308, -0]
  },
  {
    x: -708.39641853226408,
    expected: [2.2250738585072626e-308, -0]
  },
  {
    x: -1,
    expected: [0.36787944117144233, -1.2428753672788363e-17]
  },
  {
    x: -Number.EPSILON,
    expected: [0.99999999999999978, 2.4651903288156619e-32]
  },
  {
    x: -MIN_NORMAL_VALUE,
    expected: [1, -0]
  },
  {
    x: -Number.MIN_VALUE,
    expected: [1, -0]
  },
  {
    x: -0,
    expected: [1, -0]
  },
  {
    x: 0,
    expected: [1, 0]
  },
  {
    x: Number.MIN_VALUE,
    expected: [1, 0]
  },
  {
    x: MIN_NORMAL_VALUE,
    expected: [1, 0]
  },
  {
    x: Number.EPSILON,
    expected: [1.0000000000000002, 2.4651903288156619e-32]
  },
  {
    x: 1,
    expected: [2.7182818284590451, 1.4456468917292502e-16]
  },
  {
    x: 709.78271289338397,
    expected: [1.7976931348622732e308, 2.1092968483114987e291]
  },
  {
    x: 709.78271289338409,
    expected: [Infinity, Infinity]
  },
  {
    x: Number.MAX_VALUE,
    expected: [Infinity, Infinity]
  },
  {
    x: Infinity,
    expected: [Infinity, Infinity]
  },
  {
    x: NaN,
    expected: [NaN, NaN]
  },

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // random cases
  {
    x: 2.9405413144043777,
    expected: [18.92608850420778, -1.1472146997705477e-15]
  },
  {
    x: -115.76281561199872,
    expected: [5.3069863443203571e-51, 1.1612116005034526e-67]
  },
  {
    x: 11.770501341962916,
    expected: [129378.99761485896, -7.0860814429140305e-12]
  },
  {
    x: -9.4740005651453547,
    expected: [7.6823454665484562e-5, -3.492154469043747e-22]
  },
  {
    x: 22.540244986397415,
    expected: [6153242320.3263388, 1.2824504955419009e-7]
  },
  {
    x: -3.2419661913473834,
    expected: [0.039086967039738914, 6.0539007162990355e-19]
  },
  {
    x: -15.303281009499266,
    expected: [2.2587569536510771e-7, -6.2762742211705092e-24]
  },
  {
    x: -0.55456779919012955,
    expected: [0.57432042931801774, 5.4307325941070333e-18]
  },
  {
    x: 14.039705140496086,
    expected: [1251314.4796805866, -6.4253208312046249e-11]
  },
  {
    x: 0.47494763703680004,
    expected: [1.6079299993019873, -9.3013139610928664e-18]
  },
  {
    x: 1.9261376659815508,
    expected: [6.8629519732718745, -1.2957775141643505e-16]
  },
  {
    x: -5.1069530570331549,
    expected: [0.0060545025715688849, 3.7871264108133684e-19]
  },
  {
    x: -3.2154289160848837,
    expected: [0.040138114248193621, -4.1508878446562732e-20]
  },
  {
    x: -31.261373104640448,
    expected: [2.6506852653732179e-14, -1.5577450421116682e-30]
  },
  {
    x: 38.138511319042891,
    expected: [36588534420600912, -3.0629634716788323]
  },
  {
    x: 0.20467802796895887,
    expected: [1.2271298998443294, -9.8626722284568975e-17]
  },
  {
    x: -86.386155004158653,
    expected: [3.0406719574120658e-38, 2.3580825065116998e-54]
  },
  {
    x: -0.12108167192850723,
    expected: [0.88596159844565014, 4.2342900163610975e-17]
  },
  {
    x: 1.8066476083388168,
    expected: [6.0899971170982798, 1.9084157847317843e-16]
  },
  {
    x: -50.873109219803204,
    expected: [8.0554422512211914e-23, -2.0191254101266205e-39]
  },
  {
    x: 0.92640806193756708,
    expected: [2.5254217082173556, -7.5810469192539968e-17]
  },
  {
    x: 1.1448332512910866,
    expected: [3.1419174024856478, -2.3612182068790783e-17]
  },
  {
    x: 219.60356389642709,
    expected: [2.3583920733834458e95, -9.945309363510821e78]
  },
  {
    x: -0.018322897991568613,
    expected: [0.98184394572962808, 3.5570167401875729e-18]
  },
  {
    x: -0.092373500524161142,
    expected: [0.91176454140626406, 9.9022755178457721e-18]
  },
  {
    x: -1.7274563664337088,
    expected: [0.17773593055386644, 6.6022931128478986e-18]
  },
  {
    x: 5.6365184816752265,
    expected: [280.48450468585935, 1.7762246415211331e-14]
  },
  {
    x: -70.667785570044884,
    expected: [2.0387814740932615e-31, -1.2219797432578005e-47]
  },
  {
    x: -0.39464008939645095,
    expected: [0.67392254747641611, -4.4990068865752883e-19]
  },
  {
    x: 1.5004596490649016,
    expected: [4.4837495480404721, 2.0043106883745922e-16]
  },
  {
    x: -9.467190741604373,
    expected: [7.7348394179681888e-5, 1.4056170970294544e-21]
  },
  {
    x: -0.044427703199424871,
    expected: [0.95654475271906236, 3.6427370830961222e-17]
  },
  {
    x: -0.2380392725596284,
    expected: [0.78817173696441312, -8.8117320253313579e-18]
  },
  {
    x: -0.62078479822981514,
    expected: [0.53752242537119432, 9.3711398538739188e-18]
  },
  {
    x: 0.11838103563516121,
    expected: [1.1256729511684631, -7.1588812699632333e-17]
  },
  {
    x: -1.2792370533650623,
    expected: [0.27824950901757345, -1.1897343631187327e-17]
  },
  {
    x: -233.26627117626811,
    expected: [4.9402123155105395e-102, -3.0391399791605992e-118]
  },
  {
    x: 1.5877285836194255,
    expected: [4.8926231131474998, 2.8883581066113598e-16]
  },
  {
    x: 5.5336917532673953,
    expected: [253.07648448728023, 7.7558252495943509e-15]
  },
  {
    x: -0.26351152421223556,
    expected: [0.76834876777393624, 1.5574160386933907e-17]
  },
  {
    x: -0.59578365424139335,
    expected: [0.55113050084060067, -2.0040390497356098e-17]
  },
  {
    x: -25.618670587346443,
    expected: [7.480880721581542e-12, -6.7200016933025922e-28]
  },
  {
    x: 390.36909959795798,
    expected: [3.4288292691403623e169, 1.8119174639415549e152]
  },
  {
    x: 9.1215450388751425,
    expected: [9150.3283134310223, 2.8952878158933366e-13]
  },
  {
    x: -0.13014837292892062,
    expected: [0.87796515499455319, -8.9483901930458942e-18]
  },
  {
    x: -12.694049192729167,
    expected: [3.0693363489045847e-6, -1.3494912251265412e-22]
  },
  {
    x: -3.5914302821212174,
    expected: [0.027558885240263897, -3.3130016416806186e-19]
  },
  {
    x: -6.0371514969380318,
    expected: [0.0023883524626035577, 5.8259575039002129e-20]
  },
  {
    x: 553.74397357364626,
    expected: [3.075757631305549e240, 1.7392110542291218e224]
  },
  {
    x: 57.623001270758579,
    expected: [1.0601113458981292e25, -680894180.12107503]
  },
  {
    x: 0.0059541214416838593,
    expected: [1.0059718824556692, -1.1058633561160488e-16]
  },
  {
    x: 4.3800257743469642,
    expected: [79.840091204777536, 6.4938981597596416e-15]
  },
  {
    x: 3.8100426831490144,
    expected: [45.152366070358191, 4.2570978384265722e-17]
  },
  {
    x: -163.71958752223597,
    expected: [7.8974440830644688e-72, -9.5443238360151716e-89]
  },
  {
    x: 5.3212877604978557,
    expected: [204.6472490230301, 1.1621029924412739e-14]
  },
  {
    x: -0.096292001433706531,
    expected: [0.90819878199979209, -7.5391393018395336e-18]
  },
  {
    x: -0.08966619977911329,
    expected: [0.91423630662470146, -4.4238924202798792e-18]
  },
  {
    x: -0.4158482678372189,
    expected: [0.65978037279275148, 1.1062071797657896e-17]
  },
  {
    x: -332.90049449762029,
    expected: [2.6494285798898311e-145, -4.9084716708672899e-162]
  },
  {
    x: 0.21960399137712125,
    expected: [1.2455833711510427, -3.2211462833982043e-17]
  },
  {
    x: 38.421428859225891,
    expected: [48552829070429248, -0.84731612313435556]
  },
  {
    x: -736.25895673891762,
    expected: [1.7652965525907739e-320, -0]
  },
  {
    x: -60.294531483350113,
    expected: [6.5225540682293882e-27, -2.3384585139212497e-43]
  },
  {
    x: 0.35176676574171573,
    expected: [1.4215769246103391, -5.5471502742065277e-17]
  },
  {
    x: -12.076870606655483,
    expected: [5.6896000250990886e-6, -3.0477785976690719e-22]
  },
  {
    x: -10.155901749518945,
    expected: [3.8846143615302166e-5, 9.0461516478707981e-22]
  },
  {
    x: -49.318779051603165,
    expected: [3.8117675073925571e-22, 8.0595078484429191e-40]
  },
  {
    x: 0.1171449211092509,
    expected: [1.1242823501302384, -5.6547864236027882e-19]
  },
  {
    x: 0.31374981703596244,
    expected: [1.3685473064925147, 1.0143467888353968e-16]
  },
  {
    x: 0.1883123664330264,
    expected: [1.2072105485132383, 5.3318472154049229e-17]
  },
  {
    x: 2.3372923827312233,
    expected: [10.353166166437328, 7.4105705777997866e-16]
  },
  {
    x: -0.61025015937405269,
    expected: [0.54321496176115414, -4.0578868188782922e-17]
  },
  {
    x: 6.5410208749555627,
    expected: [692.99367693444867, -3.3530037686775782e-14]
  },
  {
    x: -561.10563170554087,
    expected: [2.0650015664957137e-244, -7.6196543113839642e-261]
  },
  {
    x: 4.5822319576594746,
    expected: [97.73228527748077, -2.6429733401169096e-16]
  },
  {
    x: 2.5422228461295444,
    expected: [12.707887277010609, 1.7091284827966585e-16]
  },
  {
    x: -33.594329871722707,
    expected: [2.5713897800423533e-15, -5.391946252479688e-34]
  },
  {
    x: 3.0026362518277394,
    expected: [20.138557313456065, -4.1142564778549143e-16]
  },
  {
    x: 260.7684660089036,
    expected: [1.7795321640561968e113, -2.8878467096728834e96]
  },
  {
    x: 313.82416496337191,
    expected: [1.9593098936810165e136, 3.6677003808275054e119]
  },
  {
    x: -0.75408449423846169,
    expected: [0.47044110918631693, 2.516898341389872e-17]
  },
  {
    x: 103.41186489885759,
    expected: [8.1508385140468328e44, -5.3464231645388565e26]
  },
  {
    x: 10.510369140127583,
    expected: [36694.022280196928, 4.3885318154966573e-13]
  },
  {
    x: -0.094430548675037598,
    expected: [0.90989092556200901, 3.4416050352494851e-18]
  },
  {
    x: 8.5658650754584134,
    expected: [5249.3790660547029, -3.1693453539297058e-13]
  },
  {
    x: 29.787720276896778,
    expected: [8642562815254.293, -4.6463423853686204e-5]
  },
  {
    x: -4.0509161874851234,
    expected: [0.017406419787821432, -4.2928680141855899e-19]
  },
  {
    x: -22.623966184253504,
    expected: [1.4946390591505839e-10, -1.2469526137589833e-26]
  },
  {
    x: -6.630660270357061,
    expected: [0.0013192917091721253, -3.5002051044957535e-20]
  },
  {
    x: 0.82835654639753231,
    expected: [2.2895528726808272, 8.8161000763301582e-17]
  },
  {
    x: -2.1564043322137727,
    expected: [0.11574053826431965, -6.6943085045999161e-18]
  },
  {
    x: -99.499045890921408,
    expected: [6.1392230853143115e-44, -4.0833381687821376e-60]
  },
  {
    x: -195.65964359220237,
    expected: [1.0619313858356364e-85, 2.6272599282317714e-102]
  },
  {
    x: -53.399783449695349,
    expected: [6.4382629930691779e-24, -2.4671525532480412e-41]
  },
  {
    x: -71.672267522978061,
    expected: [7.4667173105393413e-32, 3.7361511542170659e-48]
  },
  {
    x: -0.12116650315247285,
    expected: [0.88588644442661624, 5.0066078993848316e-17]
  },
  {
    x: -0.39088634813273238,
    expected: [0.67645703227548692, 3.1770298686098025e-17]
  },
  {
    x: -88.934850904199621,
    expected: [2.377305545405972e-39, -8.5032471831395277e-56]
  },
  {
    x: -289.63146697541248,
    expected: [1.6392760998146425e-126, 1.5828768988215948e-142]
  },
  {
    x: -1.7478235244880662,
    expected: [0.17415257006929494, 9.2466761562570516e-18]
  }
];

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const LOG = [
  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // special cases
  {
    x: -Infinity,
    expected: [NaN, NaN]
  },
  {
    x: -Number.MAX_VALUE,
    expected: [NaN, NaN]
  },
  {
    x: -1,
    expected: [NaN, NaN]
  },
  {
    x: -MIN_NORMAL_VALUE,
    expected: [NaN, NaN]
  },
  {
    x: -Number.MIN_VALUE,
    expected: [NaN, NaN]
  },
  {
    x: -0,
    expected: [-Infinity, -Infinity]
  },
  {
    x: 0,
    expected: [-Infinity, -Infinity]
  },
  {
    x: Number.MIN_VALUE,
    expected: [-744.44007192138122, -4.4224443409186981e-14]
  },
  {
    x: MIN_NORMAL_VALUE,
    expected: [-708.39641853226408, -2.7475416721234714e-14]
  },
  {
    x: 1 + Number.EPSILON * -0.5,
    expected: [-1.1102230246251565e-16, -6.1629758220391547e-33]
  },
  {
    x: 1,
    expected: [0, 0]
  },
  {
    x: 1 + Number.EPSILON * 1,
    expected: [2.2204460492503128e-16, 3.6563421234061236e-48]
  },
  {
    x: Number.MAX_VALUE,
    expected: [709.78271289338397, 2.3636017071323592e-14]
  },
  {
    x: Infinity,
    expected: [Infinity, Infinity]
  },
  {
    x: NaN,
    expected: [NaN, NaN]
  },

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // random cases (medium)
  {
    x: 973.06170799913502,
    expected: [6.8804475005235659, -3.6563940340132212e-16]
  },
  {
    x: 26035.996193267012,
    expected: [10.167235328481905, 5.4838612496585754e-16]
  },
  {
    x: 245.34720947686333,
    expected: [5.5026743888289387, 2.6178303244200665e-17]
  },
  {
    x: 0.0016873280103789278,
    expected: [-6.3846090601872127, 1.2274428691113029e-16]
  },
  {
    x: 0.00026262236578697418,
    expected: [-8.2447934291703113, -2.3966891984392309e-16]
  },
  {
    x: 0.0024744898770118484,
    expected: [-6.0017210145033735, 3.8826213436868081e-16]
  },
  {
    x: 5.5653562490290778,
    expected: [1.7165609986766088, 1.0013122158329705e-16]
  },
  {
    x: 3.3395701986523863e-6,
    expected: [-12.609668442294245, -3.8973069727903882e-16]
  },
  {
    x: 166.62131314132716,
    expected: [5.1157236515703657, 4.3893979195696164e-16]
  },
  {
    x: 3.2780667321136914,
    expected: [1.187253837684191, -6.499328743332392e-17]
  },
  {
    x: 1.9293980094974486,
    expected: [0.65720804208458561, -5.0673065071120293e-17]
  },
  {
    x: 2.0015755494080207e-7,
    expected: [-15.424161005825992, 8.6664123903912422e-16]
  },
  {
    x: 0.00060700886341082073,
    expected: [-7.4069671650166216, -4.8387290862718639e-17]
  },
  {
    x: 5.6951440529633677e-5,
    expected: [-9.773311573752995, 6.2902472945991994e-16]
  },
  {
    x: 4.2433235580196713e-6,
    expected: [-12.370163737753153, 2.7659315827228812e-16]
  },
  {
    x: 16.399979551376795,
    expected: [2.7972800879621067, 1.01542219337777e-16]
  },
  {
    x: 13.705963543881083,
    expected: [2.6178310332944212, 4.4739947641770068e-17]
  },
  {
    x: 0.86531471045005492,
    expected: [-0.14466201110940169, 5.3012650193545835e-18]
  },
  {
    x: 0.0010787589876018753,
    expected: [-6.8319439841048188, -2.9237866709610225e-16]
  },
  {
    x: 0.0022188335606270716,
    expected: [-6.1107736443220162, -2.0744792338512913e-16]
  },
  {
    x: 0.0039979642507067537,
    expected: [-5.5219699847381154, -1.0235455854278105e-16]
  },
  {
    x: 2.7799680107645395e-5,
    expected: [-10.490486044253117, -8.5013778025667872e-16]
  },
  {
    x: 0.028576648863726462,
    expected: [-3.5551653679484687, -1.0305502366883206e-16]
  },
  {
    x: 0.26943039893058685,
    expected: [-1.3114451819857638, -8.8190257636454583e-17]
  },
  {
    x: 0.0011317039993541172,
    expected: [-6.784030818063731, 3.9627835998444776e-16]
  },
  {
    x: 0.019612753106943007,
    expected: [-3.9315752556171963, -1.1122503996253026e-16]
  },
  {
    x: 0.027455831950553171,
    expected: [-3.5951766763773838, 1.6818735381188514e-16]
  },
  {
    x: 46.987674914431182,
    expected: [3.849885331457056, -5.008519015210021e-17]
  },
  {
    x: 7.3308413150227066e-6,
    expected: [-11.82342027170492, -1.7457640872195136e-16]
  },
  {
    x: 0.36863262898367577,
    expected: [-0.99795471627604104, 3.8771614861088266e-18]
  },
  {
    x: 7.342082716212025e-6,
    expected: [-11.821888006784199, -2.649277503632817e-16]
  },
  {
    x: 0.30250241682013357,
    expected: [-1.1956660120551119, 8.1038287247702555e-17]
  },
  {
    x: 7.5735247037645934e-5,
    expected: [-9.4882668911216417, -3.2301360118098659e-16]
  },
  {
    x: 1.4381134538662024,
    expected: [0.36333215317288398, -2.6901175898529049e-17]
  },
  {
    x: 0.063912936073875659,
    expected: [-2.7502334956166923, 1.1929396964556865e-16]
  },
  {
    x: 0.019367174234117629,
    expected: [-3.9441756958336978, 1.0281401871404979e-16]
  },
  {
    x: 0.0015328190711691517,
    expected: [-6.4806467087783997, 3.9875650732816088e-16]
  },
  {
    x: 217.48126027399439,
    expected: [5.3821126871569858, 4.267884227224442e-16]
  },
  {
    x: 192.94937351090721,
    expected: [5.2624278410797158, -3.2400077739799974e-16]
  },
  {
    x: 459.05509151208116,
    expected: [6.1291702279388982, 9.3206172277287878e-17]
  },
  {
    x: 25241.602260949614,
    expected: [10.136248795660505, 7.5520379238027727e-16]
  },
  {
    x: 15437.067153190277,
    expected: [9.6445268543175029, 4.1653935240522712e-16]
  },
  {
    x: 15519.423911795737,
    expected: [9.6498476739629524, 8.1060088268888193e-16]
  },
  {
    x: 1.4472320330390172e-8,
    expected: [-18.051027954604866, 9.3012972953562799e-16]
  },
  {
    x: 20.013717239215424,
    expected: [2.9964179004189369, 1.107959109582466e-16]
  },
  {
    x: 1.8657605969792042,
    expected: [0.62366879675553433, 7.6767446224915195e-18]
  },
  {
    x: 377.66094579362107,
    expected: [5.9339968243024144, 8.0687840013675155e-17]
  },
  {
    x: 1.6561812643491409,
    expected: [0.50451450912088447, 1.4831398059064263e-17]
  },
  {
    x: 3.9318288580146659,
    expected: [1.3691046759090411, 3.0199388233218344e-17]
  },
  {
    x: 1161.4630716389129,
    expected: [7.0574357580235123, 3.0769676163329015e-16]
  },
  {
    x: 0.3526791112406964,
    expected: [-1.0421966687826583, 8.4842252934133122e-17]
  },
  {
    x: 0.29719368294788873,
    expected: [-1.2133712215868755, 1.4104030126278955e-17]
  },
  {
    x: 738860.83803132572,
    expected: [13.512864871008556, -1.6117193377417727e-16]
  },
  {
    x: 1.1127588735508744e-8,
    expected: [-18.313838340636838, 1.5023195649261405e-15]
  },
  {
    x: 1126770.8468473856,
    expected: [13.934866442132249, -4.7112706672032416e-16]
  },
  {
    x: 1.4151066734213007,
    expected: [0.34720491583059132, 1.2725627985350324e-17]
  },
  {
    x: 0.0098907719460915935,
    expected: [-4.6161530831992117, -6.6673237691413675e-17]
  },
  {
    x: 5.6294338958426806,
    expected: [1.7280088857358797, 1.0884155134876916e-16]
  },
  {
    x: 0.016539632656326159,
    expected: [-4.1019957990451861, 2.4955405428766476e-16]
  },
  {
    x: 0.00039614401082872439,
    expected: [-7.8337327491105126, -2.3667334071925512e-16]
  },
  {
    x: 0.0033789842327436315,
    expected: [-5.6901801375101666, 2.5390708361600522e-16]
  },
  {
    x: 145.06630597027379,
    expected: [4.977190920452383, -3.8292135955511595e-16]
  },
  {
    x: 0.14738313222945348,
    expected: [-1.91471974112483, -7.0846714694557986e-18]
  },
  {
    x: 0.0044861074403814705,
    expected: [-5.4067698930190105, 1.5953303751432426e-16]
  },
  {
    x: 0.21906300865487094,
    expected: [-1.5183958797936026, -2.2738339893514533e-17]
  },
  {
    x: 134371.84069991414,
    expected: [11.808366166517269, -3.9958064416643603e-16]
  },
  {
    x: 0.00089620603759230609,
    expected: [-7.0173402187544216, -3.1040351271900453e-16]
  },
  {
    x: 0.026299380915228557,
    expected: [-3.6382098794203945, -1.7431750334760757e-16]
  },
  {
    x: 4.0260533569252903,
    expected: [1.3927865802160402, 6.4633415863172777e-17]
  },
  {
    x: 0.10443398516730334,
    expected: [-2.2592001280840339, -5.8181687461650336e-17]
  },
  {
    x: 0.15647652174470061,
    expected: [-1.8548493010568101, 1.2833609470035528e-17]
  },
  {
    x: 62.410095397738814,
    expected: [4.1337270475097379, 8.0674972886427821e-17]
  },
  {
    x: 1.4102415133645962,
    expected: [0.34376097579647397, -2.6239741765857469e-17]
  },
  {
    x: 0.0048478341652802848,
    expected: [-5.3292232376318154, 2.1944406124764516e-16]
  },
  {
    x: 5.337999752829249e-6,
    expected: [-12.140659553285943, 1.0963841359671288e-16]
  },
  {
    x: 2.5225430309306418,
    expected: [0.9252675319427992, 3.177426310155432e-17]
  },
  {
    x: 4542.2833764492279,
    expected: [8.4211851109547222, 8.2753089288892233e-16]
  },
  {
    x: 2.6613404191969165e-7,
    expected: [-15.13926573809692, 7.916150930647066e-16]
  },
  {
    x: 1.2566469044853248,
    expected: [0.22844698679441, 2.1672533127831662e-18]
  },
  {
    x: 0.0010294479855571495,
    expected: [-6.8787325567580941, 5.5078098815027521e-17]
  },
  {
    x: 4.2465814187965734,
    expected: [1.4461142872076798, 9.4364685065906162e-17]
  },
  {
    x: 68.688150932827909,
    expected: [4.229576708848005, -5.9281636598745507e-18]
  },
  {
    x: 0.0015639967707320838,
    expected: [-6.4605107016104562, -1.6323726323901038e-16]
  },
  {
    x: 0.00070327169928173223,
    expected: [-7.2597672553551105, 1.6690155362286937e-16]
  },
  {
    x: 1.5356610630039196,
    expected: [0.42896094826919245, 1.663396470555714e-17]
  },
  {
    x: 2.42611259790446,
    expected: [0.88629022243098388, -3.6277691014161981e-17]
  },
  {
    x: 0.43181168959459093,
    expected: [-0.83976568948789432, -4.4752008662887331e-17]
  },
  {
    x: 7156.3620688759383,
    expected: [8.875757039893637, -5.9676431098135231e-16]
  },
  {
    x: 0.00024493646507178302,
    expected: [-8.3145117072880304, -2.24926569806488e-16]
  },
  {
    x: 9.6350977976120475,
    expected: [2.265412452059969, 1.6105806186358457e-16]
  },
  {
    x: 0.082060189582428111,
    expected: [-2.5003022816803915, -6.5044630957318345e-18]
  },
  {
    x: 11.06531028046092,
    expected: [2.403815014724036, -6.1676164545512111e-17]
  },
  {
    x: 0.19396315604991043,
    expected: [-1.64008705522388, 3.9791401665134997e-17]
  },
  {
    x: 0.23476603091017278,
    expected: [-1.449165873938161, 9.8136417443981099e-18]
  },
  {
    x: 9.5702988177886333e-5,
    expected: [-9.2542610355635144, 8.3227597579055727e-16]
  },
  {
    x: 7.2210878254913634e-5,
    expected: [-9.5359198550642255, 2.8355397353566518e-16]
  },
  {
    x: 0.10895365810132498,
    expected: [-2.2168326421907349, -2.1103309910559523e-16]
  },
  {
    x: 779.76432320817912,
    expected: [6.6589917242941059, 2.6561639716806717e-16]
  },
  {
    x: 0.0016487494558549975,
    expected: [-6.4077381839676804, -2.4738534376427706e-16]
  },
  {
    x: 7086.0195110992463,
    expected: [8.865879038893155, -6.3025674036380283e-16]
  },

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // random cases (small/large)
  {
    x: 2.321239763186424e-115,
    expected: [-263.95518427068373, -1.2634259443888354e-14]
  },
  {
    x: 1.0335866649830365e-172,
    expected: [-396.01160104253859, 3.9914708027903162e-15]
  },
  {
    x: 3.2010714622484636e121,
    expected: [279.77628183799413, 1.1399135249522681e-14]
  },
  {
    x: 1.5001501808363869e112,
    expected: [258.29509563898716, -1.9754533717751985e-14]
  },
  {
    x: 1.406221485347929e-65,
    expected: [-149.32712473493388, -1.2487323922595499e-15]
  },
  {
    x: 1.5458119150468102e255,
    expected: [587.59474799715576, 1.5961829635309598e-14]
  },
  {
    x: 1.1337050859320411e-94,
    expected: [-216.31750763527324, 1.8157286073113777e-15]
  },
  {
    x: 9.5225279965769006e129,
    expected: [299.28713735564304, -1.5780081840432723e-14]
  },
  {
    x: 2.6634441592779521e64,
    expected: [148.34506603360717, -3.0843187291045259e-15]
  },
  {
    x: 1.479054196822938e50,
    expected: [115.52065747699415, -5.9811578014126999e-15]
  },
  {
    x: 3.4501533484522063e-260,
    expected: [-597.43370549956967, -3.3852230512192162e-14]
  },
  {
    x: 3.663165462516973e-140,
    expected: [-321.06358536507759, -2.0777469196959085e-14]
  },
  {
    x: 3.1789270057320845e46,
    expected: [107.07545799799829, 1.0410205976495617e-15]
  },
  {
    x: 2.3410541677151175e90,
    expected: [208.08325969641305, 5.2164514477919124e-15]
  },
  {
    x: 9.5244965118638175e50,
    expected: [117.38312170967109, -2.0798511966205682e-15]
  },
  {
    x: 1.1511112646511688e37,
    expected: [85.336376233659024, -5.1281418110226826e-15]
  },
  {
    x: 5.3986914491847389e195,
    expected: [450.6902497338188, 2.6950955840677937e-14]
  },
  {
    x: 9.3252469969202896e130,
    expected: [301.5687875420104, 2.2889227894470521e-14]
  },
  {
    x: 7.8065818740835509e86,
    expected: [200.0772852053698, -5.3734252300378467e-15]
  },
  {
    x: 1.3569826240530674e101,
    expected: [232.8663579684922, -9.5334882962874073e-15]
  },
  {
    x: 1.2766163758542112e-273,
    expected: [-628.3615172659072, -2.38897721344412e-14]
  },
  {
    x: 6.2134500231121079e197,
    expected: [455.43597962078377, 8.2152405055246095e-15]
  },
  {
    x: 6.9363601688082188e104,
    expected: [241.40562683696297, 7.4295287428814131e-15]
  },
  {
    x: 3.7015771599780308e42,
    expected: [98.017332894030872, -5.2031704416490392e-15]
  },
  {
    x: 1.1360124968749956e-13,
    expected: [-29.806081887913901, 1.638788317525458e-15]
  },
  {
    x: 1.1098005562618669e-281,
    expected: [-646.92223081119016, -9.6453469589724647e-15]
  },
  {
    x: 17842313513545728,
    expected: [37.420349194907224, 6.198429734779543e-16]
  },
  {
    x: 1.6688543267577858e-35,
    expected: [-80.078340895672056, 4.4989438268519991e-15]
  },
  {
    x: 1.3061566650158681e-17,
    expected: [-38.876857599340084, 7.7512395943327743e-16]
  },
  {
    x: 1.6117773886666879e32,
    expected: [74.160060513997109, -6.7477030127244603e-15]
  },
  {
    x: 430.06571435803244,
    expected: [6.0639380210996441, 1.5835139194097416e-16]
  },
  {
    x: 8.6932733331489843e-99,
    expected: [-225.79337465990571, 1.4016416007812695e-14]
  },
  {
    x: 1.5384316928858766e129,
    expected: [297.46424051251199, -2.4269986252208564e-17]
  },
  {
    x: 1.5372563420409072e-122,
    expected: [-280.48538211385517, 5.4236513331845323e-15]
  },
  {
    x: 2.2345734303649016e-122,
    expected: [-280.11133099432107, 1.100584693853068e-14]
  },
  {
    x: 0.00048556333297238193,
    expected: [-7.6302008297758794, -4.479191927636778e-17]
  },
  {
    x: 7.7223656734458604e236,
    expected: [545.45420269807425, -3.6310395331915773e-14]
  },
  {
    x: 2.9982859763638094e128,
    expected: [295.82893268741628, 2.5085464378860537e-14]
  },
  {
    x: 3.7116714809975753e149,
    expected: [344.39666116523381, 1.6831611802870932e-16]
  },
  {
    x: 1.8628141427849815e168,
    expected: [387.45638394731566, -2.5338483574333089e-14]
  },
  {
    x: 7.1455171505612781e-79,
    expected: [-179.93773715840226, -1.1728038538069997e-14]
  },
  {
    x: 3.8445237583233406e-45,
    expected: [-102.26967944943966, 3.5605278982425763e-15]
  },
  {
    x: 4.07093187520951e-25,
    expected: [-56.160755389636492, 9.7580276662412053e-16]
  },
  {
    x: 4.8295024695873465e-88,
    expected: [-201.05274472948426, -1.3853389419691662e-14]
  },
  {
    x: 9.309423158140669e-60,
    expected: [-135.92407844965672, 4.6901703399330653e-15]
  },
  {
    x: 1.1812375323421874e220,
    expected: [506.7352831038292, 9.1657194656307024e-15]
  },
  {
    x: 4.8599293311303048e-5,
    expected: [-9.9319015680832372, 6.1680990842349104e-16]
  },
  {
    x: 5.5167755005367381e-76,
    expected: [-173.28867352639313, -1.1660784771762639e-14]
  },
  {
    x: 9.3839644774196421e-23,
    expected: [-50.720454812960256, -1.0105253005607599e-16]
  },
  {
    x: 4.7763168113540576e166,
    expected: [383.79279514493749, 4.2549589609783111e-16]
  },

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // random cases (close to 1)
  {
    x: 0.99999999999999711,
    expected: [-2.8865798640254113e-15, 1.7256332301708832e-31]
  },
  {
    x: 0.96019016930003631,
    expected: [-0.040623921117215703, -4.3116892444051852e-19]
  },
  {
    x: 0.99999999992333422,
    expected: [-7.6665784834614227e-11, -3.6620425267293181e-27]
  },
  {
    x: 1.0000000000006597,
    expected: [6.5969452123205042e-13, 9.6142432393710327e-31]
  },
  {
    x: 0.96986531500079598,
    expected: [-0.030598067639976988, -3.2842054923350616e-19]
  },
  {
    x: 0.99999999999990075,
    expected: [-9.9253938401493917e-14, -3.1800955244981319e-30]
  },
  {
    x: 1.0153042247746118,
    expected: [0.015188296426016963, -4.0588533351310146e-19]
  },
  {
    x: 1.0000000007473451,
    expected: [7.4734507443492727e-10, 4.8441854320366575e-26]
  },
  {
    x: 1.0000006380523003,
    expected: [6.3805209677270237e-7, 5.4601609603523776e-24]
  },
  {
    x: 1.0000000000000069,
    expected: [6.8833827526759469e-15, -2.4651903288047906e-32]
  },
  {
    x: 1.0003907644331063,
    expected: [0.00039068810456884158, 2.2740844250707237e-20]
  },
  {
    x: 0.99977544909510163,
    expected: [-0.00022457612022763447, 3.5688579678943504e-21]
  },
  {
    x: 1.0000016640537392,
    expected: [1.6640523547117186e-6, 2.354256113037002e-23]
  },
  {
    x: 0.99999999999892886,
    expected: [-1.0711431741589248e-12, 6.1531150197581041e-29]
  },
  {
    x: 0.99999979371919268,
    expected: [-2.0628082860032132e-7, -1.3463409399442499e-24]
  },
  {
    x: 0.99749465290144002,
    expected: [-0.0025084907322955692, -1.510139592307687e-20]
  },
  {
    x: 0.99999999999755329,
    expected: [-2.4467095016719133e-12, 8.53695362045694e-29]
  },
  {
    x: 0.99999983999427622,
    expected: [-1.60005736582526e-7, -4.9748095689361119e-24]
  },
  {
    x: 1.0000070049135059,
    expected: [7.0048889716226619e-6, -4.1514553030804701e-22]
  },
  {
    x: 1.0000000002536402,
    expected: [2.5364021990606704e-10, -4.7017924531090967e-27]
  },
  {
    x: 1.0000000007991521,
    expected: [7.9915207752676609e-10, -9.6573320225597794e-27]
  },
  {
    x: 1.1058352936980458,
    expected: [0.10060097130334252, -4.5163500203981633e-18]
  },
  {
    x: 1.0000000000057709,
    expected: [5.7709392819849118e-12, -1.350917893728898e-29]
  },
  {
    x: 1.0639295280245573,
    expected: [0.061969155666320108, -9.4300206176898995e-19]
  },
  {
    x: 1.0000000000015583,
    expected: [1.5583090373626556e-12, -4.979684338071504e-29]
  },
  {
    x: 0.99999999999993427,
    expected: [-6.5725203057811426e-14, -1.5777218105366635e-30]
  },
  {
    x: 0.99999999999999822,
    expected: [-1.776356839400252e-15, -1.8682839144721255e-45]
  },
  {
    x: 0.96020230533131479,
    expected: [-0.040611282001577667, -2.7857653889544614e-18]
  },
  {
    x: 1.0072638369754419,
    expected: [0.0072375823744035778, -4.0715753481882799e-19]
  },
  {
    x: 1.0000000000000013,
    expected: [1.3322676295501871e-15, -9.8607613152625687e-32]
  },
  {
    x: 0.99305358796188892,
    expected: [-0.0069706506711191317, 2.9644025009400383e-19]
  },
  {
    x: 0.99999999365409531,
    expected: [-6.3459047107541623e-9, 3.7542915193213968e-25]
  },
  {
    x: 1.0000000000000051,
    expected: [5.1070259132757067e-15, 3.6977854932239369e-31]
  },
  {
    x: 0.9999999999903908,
    expected: [-9.6092023227818235e-12, 2.4888531983632992e-28]
  },
  {
    x: 0.99999999762480196,
    expected: [-2.375198041072152e-9, -1.959856955280648e-25]
  },
  {
    x: 0.9999998876861409,
    expected: [-1.123138654091332e-7, -1.1316563804359527e-24]
  },
  {
    x: 1.0000775375866731,
    expected: [7.7534580789764623e-5, 5.3253706084114098e-22]
  },
  {
    x: 0.99934969533700135,
    expected: [-0.00065051620279118604, 4.1359401915423947e-20]
  },
  {
    x: 1.0009172627003229,
    expected: [0.00091684227196803952, 5.9416972874120985e-21]
  },
  {
    x: 1.0000000000000093,
    expected: [9.3258734068512708e-15, 6.9025329206865569e-31]
  },
  {
    x: 1.0000000000000053,
    expected: [5.3290705182007372e-15, 5.0446744715693415e-44]
  },
  {
    x: 0.99999999999998979,
    expected: [-1.0214051826551492e-14, -9.8607613152981683e-32]
  },
  {
    x: 0.99999999999999789,
    expected: [-2.1094237467877998e-15, 1.4174844390689743e-31]
  },
  {
    x: 0.99999999998065625,
    expected: [-1.9343748825138581e-11, 1.1431494836172761e-27]
  },
  {
    x: 0.94132455601309739,
    expected: [-0.060467293429278632, 1.2347043343462126e-18]
  },
  {
    x: 1.0000000000095195,
    expected: [9.5194963023006315e-12, 3.5183225128339268e-28]
  },
  {
    x: 1.000000000002635,
    expected: [2.635003326641875e-12, -1.2841175812951877e-28]
  },
  {
    x: 1.2222551870247165,
    expected: [0.20069766630047559, -4.5736411076473861e-18]
  },
  {
    x: 0.99984811814188601,
    expected: [-0.00015189339333140949, -5.7026870006906305e-21]
  },
  {
    x: 1.0000000000000122,
    expected: [1.2212453270876648e-14, -4.1908235589805541e-31]
  }
];

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const POW = [
  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // special cases
  {
    x: -Infinity,
    y: -Infinity,
    expected: [0, 0]
  },
  {
    x: -Number.MAX_VALUE,
    y: -Infinity,
    expected: [0, 0]
  },
  {
    x: -1,
    y: -Infinity,
    expected: [1, 0]
  },
  {
    x: -Number.MIN_VALUE,
    y: -Infinity,
    expected: [Infinity, Infinity]
  },
  {
    x: -0,
    y: -Infinity,
    expected: [Infinity, Infinity]
  },
  {
    x: 0,
    y: -Infinity,
    expected: [Infinity, Infinity]
  },
  {
    x: Number.MIN_VALUE,
    y: -Infinity,
    expected: [Infinity, Infinity]
  },
  {
    x: 1 + Number.EPSILON * -0.5,
    y: -Infinity,
    expected: [Infinity, Infinity]
  },
  {
    x: 1,
    y: -Infinity,
    expected: [1, 0]
  },
  {
    x: 1 + Number.EPSILON * 1,
    y: -Infinity,
    expected: [0, 0]
  },
  {
    x: Number.MAX_VALUE,
    y: -Infinity,
    expected: [0, 0]
  },
  {
    x: Infinity,
    y: -Infinity,
    expected: [0, 0]
  },
  {
    x: NaN,
    y: -Infinity,
    expected: [NaN, NaN]
  },
  {
    x: -Infinity,
    y: -Number.MAX_VALUE,
    expected: [0, 0]
  },
  {
    x: -Number.MAX_VALUE,
    y: -Number.MAX_VALUE,
    expected: [0, 0]
  },
  {
    x: -1,
    y: -Number.MAX_VALUE,
    expected: [1, 0]
  },
  {
    x: -Number.MIN_VALUE,
    y: -Number.MAX_VALUE,
    expected: [Infinity, Infinity]
  },
  {
    x: -0,
    y: -Number.MAX_VALUE,
    expected: [Infinity, Infinity]
  },
  {
    x: 0,
    y: -Number.MAX_VALUE,
    expected: [Infinity, Infinity]
  },
  {
    x: Number.MIN_VALUE,
    y: -Number.MAX_VALUE,
    expected: [Infinity, Infinity]
  },
  {
    x: 1 + Number.EPSILON * -0.5,
    y: -Number.MAX_VALUE,
    expected: [Infinity, Infinity]
  },
  {
    x: 1,
    y: -Number.MAX_VALUE,
    expected: [1, 0]
  },
  {
    x: 1 + Number.EPSILON * 1,
    y: -Number.MAX_VALUE,
    expected: [0, 0]
  },
  {
    x: Number.MAX_VALUE,
    y: -Number.MAX_VALUE,
    expected: [0, 0]
  },
  {
    x: Infinity,
    y: -Number.MAX_VALUE,
    expected: [0, 0]
  },
  {
    x: NaN,
    y: -Number.MAX_VALUE,
    expected: [NaN, NaN]
  },
  {
    x: -Infinity,
    y: -(Number.MAX_SAFE_INTEGER + 1),
    expected: [0, 0]
  },
  {
    x: -Number.MAX_VALUE,
    y: -(Number.MAX_SAFE_INTEGER + 1),
    expected: [0, 0]
  },
  {
    x: -1,
    y: -(Number.MAX_SAFE_INTEGER + 1),
    expected: [1, 0]
  },
  {
    x: -Number.MIN_VALUE,
    y: -(Number.MAX_SAFE_INTEGER + 1),
    expected: [Infinity, Infinity]
  },
  {
    x: -0,
    y: -(Number.MAX_SAFE_INTEGER + 1),
    expected: [Infinity, Infinity]
  },
  {
    x: 0,
    y: -(Number.MAX_SAFE_INTEGER + 1),
    expected: [Infinity, Infinity]
  },
  {
    x: Number.MIN_VALUE,
    y: -(Number.MAX_SAFE_INTEGER + 1),
    expected: [Infinity, Infinity]
  },
  {
    x: 1 + Number.EPSILON * -0.5,
    y: -(Number.MAX_SAFE_INTEGER + 1),
    expected: [2.7182818284590455, -1.4862956700836748e-16]
  },
  {
    x: 1,
    y: -(Number.MAX_SAFE_INTEGER + 1),
    expected: [1, 0]
  },
  {
    x: 1 + Number.EPSILON * 1,
    y: -(Number.MAX_SAFE_INTEGER + 1),
    expected: [0.13533528323661273, -8.1289203498247281e-18]
  },
  {
    x: Number.MAX_VALUE,
    y: -(Number.MAX_SAFE_INTEGER + 1),
    expected: [0, 0]
  },
  {
    x: Infinity,
    y: -(Number.MAX_SAFE_INTEGER + 1),
    expected: [0, 0]
  },
  {
    x: NaN,
    y: -(Number.MAX_SAFE_INTEGER + 1),
    expected: [NaN, NaN]
  },
  {
    x: -Infinity,
    y: -1,
    expected: [-0, -0]
  },
  {
    x: -Number.MAX_VALUE,
    y: -1,
    expected: [-5.5626846462680035e-309, -0]
  },
  {
    x: -1,
    y: -1,
    expected: [-1, 0]
  },
  {
    x: -Number.MIN_VALUE,
    y: -1,
    expected: [-Infinity, -Infinity]
  },
  {
    x: -0,
    y: -1,
    expected: [-Infinity, -Infinity]
  },
  {
    x: 0,
    y: -1,
    expected: [Infinity, Infinity]
  },
  {
    x: Number.MIN_VALUE,
    y: -1,
    expected: [Infinity, Infinity]
  },
  {
    x: 1 + Number.EPSILON * -0.5,
    y: -1,
    expected: [1.0000000000000002, -1.1102230246251564e-16]
  },
  {
    x: 1,
    y: -1,
    expected: [1, 0]
  },
  {
    x: 1 + Number.EPSILON * 1,
    y: -1,
    expected: [0.99999999999999978, 4.9303806576313238e-32]
  },
  {
    x: Number.MAX_VALUE,
    y: -1,
    expected: [5.5626846462680035e-309, 0]
  },
  {
    x: Infinity,
    y: -1,
    expected: [0, 0]
  },
  {
    x: NaN,
    y: -1,
    expected: [NaN, NaN]
  },
  {
    x: -Infinity,
    y: -Number.EPSILON,
    expected: [0, 0]
  },
  {
    x: -Number.MAX_VALUE,
    y: -Number.EPSILON,
    expected: [NaN, NaN]
  },
  {
    x: -1,
    y: -Number.EPSILON,
    expected: [NaN, NaN]
  },
  {
    x: -Number.MIN_VALUE,
    y: -Number.EPSILON,
    expected: [NaN, NaN]
  },
  {
    x: -0,
    y: -Number.EPSILON,
    expected: [Infinity, Infinity]
  },
  {
    x: 0,
    y: -Number.EPSILON,
    expected: [Infinity, Infinity]
  },
  {
    x: Number.MIN_VALUE,
    y: -Number.EPSILON,
    expected: [1.0000000000001652, 9.7715595935363696e-17]
  },
  {
    x: 1 + Number.EPSILON * -0.5,
    y: -Number.EPSILON,
    expected: [1, 2.4651903288156619e-32]
  },
  {
    x: 1,
    y: -Number.EPSILON,
    expected: [1, 0]
  },
  {
    x: 1 + Number.EPSILON * 1,
    y: -Number.EPSILON,
    expected: [1, -4.9303806576313238e-32]
  },
  {
    x: Number.MAX_VALUE,
    y: -Number.EPSILON,
    expected: [0.99999999999984235, 4.8247429756273019e-17]
  },
  {
    x: Infinity,
    y: -Number.EPSILON,
    expected: [0, 0]
  },
  {
    x: NaN,
    y: -Number.EPSILON,
    expected: [NaN, NaN]
  },
  {
    x: -Infinity,
    y: -Number.MIN_VALUE,
    expected: [0, 0]
  },
  {
    x: -Number.MAX_VALUE,
    y: -Number.MIN_VALUE,
    expected: [NaN, NaN]
  },
  {
    x: -1,
    y: -Number.MIN_VALUE,
    expected: [NaN, NaN]
  },
  {
    x: -Number.MIN_VALUE,
    y: -Number.MIN_VALUE,
    expected: [NaN, NaN]
  },
  {
    x: -0,
    y: -Number.MIN_VALUE,
    expected: [Infinity, Infinity]
  },
  {
    x: 0,
    y: -Number.MIN_VALUE,
    expected: [Infinity, Infinity]
  },
  {
    x: Number.MIN_VALUE,
    y: -Number.MIN_VALUE,
    expected: [1, 0]
  },
  {
    x: 1 + Number.EPSILON * -0.5,
    y: -Number.MIN_VALUE,
    expected: [1, 0]
  },
  {
    x: 1,
    y: -Number.MIN_VALUE,
    expected: [1, 0]
  },
  {
    x: 1 + Number.EPSILON * 1,
    y: -Number.MIN_VALUE,
    expected: [1, 0]
  },
  {
    x: Number.MAX_VALUE,
    y: -Number.MIN_VALUE,
    expected: [1, 0]
  },
  {
    x: Infinity,
    y: -Number.MIN_VALUE,
    expected: [0, 0]
  },
  {
    x: NaN,
    y: -Number.MIN_VALUE,
    expected: [NaN, NaN]
  },
  {
    x: -Infinity,
    y: -0,
    expected: [1, 0]
  },
  {
    x: -Number.MAX_VALUE,
    y: -0,
    expected: [1, 0]
  },
  {
    x: -1,
    y: -0,
    expected: [1, 0]
  },
  {
    x: -Number.MIN_VALUE,
    y: -0,
    expected: [1, 0]
  },
  {
    x: -0,
    y: -0,
    expected: [1, 0]
  },
  {
    x: 0,
    y: -0,
    expected: [1, 0]
  },
  {
    x: Number.MIN_VALUE,
    y: -0,
    expected: [1, 0]
  },
  {
    x: 1 + Number.EPSILON * -0.5,
    y: -0,
    expected: [1, 0]
  },
  {
    x: 1,
    y: -0,
    expected: [1, 0]
  },
  {
    x: 1 + Number.EPSILON * 1,
    y: -0,
    expected: [1, 0]
  },
  {
    x: Number.MAX_VALUE,
    y: -0,
    expected: [1, 0]
  },
  {
    x: Infinity,
    y: -0,
    expected: [1, 0]
  },
  {
    x: NaN,
    y: -0,
    expected: [1, 0]
  },
  {
    x: -Infinity,
    y: 0,
    expected: [1, 0]
  },
  {
    x: -Number.MAX_VALUE,
    y: 0,
    expected: [1, 0]
  },
  {
    x: -1,
    y: 0,
    expected: [1, 0]
  },
  {
    x: -Number.MIN_VALUE,
    y: 0,
    expected: [1, 0]
  },
  {
    x: -0,
    y: 0,
    expected: [1, 0]
  },
  {
    x: 0,
    y: 0,
    expected: [1, 0]
  },
  {
    x: Number.MIN_VALUE,
    y: 0,
    expected: [1, 0]
  },
  {
    x: 1 + Number.EPSILON * -0.5,
    y: 0,
    expected: [1, 0]
  },
  {
    x: 1,
    y: 0,
    expected: [1, 0]
  },
  {
    x: 1 + Number.EPSILON * 1,
    y: 0,
    expected: [1, 0]
  },
  {
    x: Number.MAX_VALUE,
    y: 0,
    expected: [1, 0]
  },
  {
    x: Infinity,
    y: 0,
    expected: [1, 0]
  },
  {
    x: NaN,
    y: 0,
    expected: [1, 0]
  },
  {
    x: -Infinity,
    y: Number.MIN_VALUE,
    expected: [Infinity, Infinity]
  },
  {
    x: -Number.MAX_VALUE,
    y: Number.MIN_VALUE,
    expected: [NaN, NaN]
  },
  {
    x: -1,
    y: Number.MIN_VALUE,
    expected: [NaN, NaN]
  },
  {
    x: -Number.MIN_VALUE,
    y: Number.MIN_VALUE,
    expected: [NaN, NaN]
  },
  {
    x: -0,
    y: Number.MIN_VALUE,
    expected: [0, 0]
  },
  {
    x: 0,
    y: Number.MIN_VALUE,
    expected: [0, 0]
  },
  {
    x: Number.MIN_VALUE,
    y: Number.MIN_VALUE,
    expected: [1, 0]
  },
  {
    x: 1 + Number.EPSILON * -0.5,
    y: Number.MIN_VALUE,
    expected: [1, 0]
  },
  {
    x: 1,
    y: Number.MIN_VALUE,
    expected: [1, 0]
  },
  {
    x: 1 + Number.EPSILON * 1,
    y: Number.MIN_VALUE,
    expected: [1, 0]
  },
  {
    x: Number.MAX_VALUE,
    y: Number.MIN_VALUE,
    expected: [1, 0]
  },
  {
    x: Infinity,
    y: Number.MIN_VALUE,
    expected: [Infinity, Infinity]
  },
  {
    x: NaN,
    y: Number.MIN_VALUE,
    expected: [NaN, NaN]
  },
  {
    x: -Infinity,
    y: Number.EPSILON,
    expected: [Infinity, Infinity]
  },
  {
    x: -Number.MAX_VALUE,
    y: Number.EPSILON,
    expected: [NaN, NaN]
  },
  {
    x: -1,
    y: Number.EPSILON,
    expected: [NaN, NaN]
  },
  {
    x: -Number.MIN_VALUE,
    y: Number.EPSILON,
    expected: [NaN, NaN]
  },
  {
    x: -0,
    y: Number.EPSILON,
    expected: [0, 0]
  },
  {
    x: 0,
    y: Number.EPSILON,
    expected: [0, 0]
  },
  {
    x: Number.MIN_VALUE,
    y: Number.EPSILON,
    expected: [0.99999999999983469, 1.3306706554475689e-17]
  },
  {
    x: 1 + Number.EPSILON * -0.5,
    y: Number.EPSILON,
    expected: [1, -2.4651903288156619e-32]
  },
  {
    x: 1,
    y: Number.EPSILON,
    expected: [1, 0]
  },
  {
    x: 1 + Number.EPSILON * 1,
    y: Number.EPSILON,
    expected: [1, 4.9303806576313238e-32]
  },
  {
    x: Number.MAX_VALUE,
    y: Number.EPSILON,
    expected: [1.0000000000001577, -4.824742973143418e-17]
  },
  {
    x: Infinity,
    y: Number.EPSILON,
    expected: [Infinity, Infinity]
  },
  {
    x: NaN,
    y: Number.EPSILON,
    expected: [NaN, NaN]
  },
  {
    x: -Infinity,
    y: 1,
    expected: [-Infinity, -Infinity]
  },
  {
    x: -Number.MAX_VALUE,
    y: 1,
    expected: [-Number.MAX_VALUE, 0]
  },
  {
    x: -1,
    y: 1,
    expected: [-1, 0]
  },
  {
    x: -Number.MIN_VALUE,
    y: 1,
    expected: [-Number.MIN_VALUE, 0]
  },
  {
    x: -0,
    y: 1,
    expected: [-0, -0]
  },
  {
    x: 0,
    y: 1,
    expected: [0, 0]
  },
  {
    x: Number.MIN_VALUE,
    y: 1,
    expected: [Number.MIN_VALUE, 0]
  },
  {
    x: 1 + Number.EPSILON * -0.5,
    y: 1,
    expected: [1 + Number.EPSILON * -0.5, 0]
  },
  {
    x: 1,
    y: 1,
    expected: [1, 0]
  },
  {
    x: 1 + Number.EPSILON * 1,
    y: 1,
    expected: [1 + Number.EPSILON * 1, 0]
  },
  {
    x: Number.MAX_VALUE,
    y: 1,
    expected: [Number.MAX_VALUE, 0]
  },
  {
    x: Infinity,
    y: 1,
    expected: [Infinity, Infinity]
  },
  {
    x: NaN,
    y: 1,
    expected: [NaN, NaN]
  },
  {
    x: -Infinity,
    y: Number.MAX_SAFE_INTEGER + 1,
    expected: [Infinity, Infinity]
  },
  {
    x: -Number.MAX_VALUE,
    y: Number.MAX_SAFE_INTEGER + 1,
    expected: [Infinity, Infinity]
  },
  {
    x: -1,
    y: Number.MAX_SAFE_INTEGER + 1,
    expected: [1, 0]
  },
  {
    x: -Number.MIN_VALUE,
    y: Number.MAX_SAFE_INTEGER + 1,
    expected: [0, 0]
  },
  {
    x: -0,
    y: Number.MAX_SAFE_INTEGER + 1,
    expected: [0, 0]
  },
  {
    x: 0,
    y: Number.MAX_SAFE_INTEGER + 1,
    expected: [0, 0]
  },
  {
    x: Number.MIN_VALUE,
    y: Number.MAX_SAFE_INTEGER + 1,
    expected: [0, 0]
  },
  {
    x: 1 + Number.EPSILON * -0.5,
    y: Number.MAX_SAFE_INTEGER + 1,
    expected: [0.36787944117144228, 2.266098626473091e-17]
  },
  {
    x: 1,
    y: Number.MAX_SAFE_INTEGER + 1,
    expected: [1, 0]
  },
  {
    x: 1 + Number.EPSILON * 1,
    y: Number.MAX_SAFE_INTEGER + 1,
    expected: [7.3890560989306486, -4.4054597834089866e-17]
  },
  {
    x: Number.MAX_VALUE,
    y: Number.MAX_SAFE_INTEGER + 1,
    expected: [Infinity, Infinity]
  },
  {
    x: Infinity,
    y: Number.MAX_SAFE_INTEGER + 1,
    expected: [Infinity, Infinity]
  },
  {
    x: NaN,
    y: Number.MAX_SAFE_INTEGER + 1,
    expected: [NaN, NaN]
  },
  {
    x: -Infinity,
    y: Number.MAX_VALUE,
    expected: [Infinity, Infinity]
  },
  {
    x: -Number.MAX_VALUE,
    y: Number.MAX_VALUE,
    expected: [Infinity, Infinity]
  },
  {
    x: -1,
    y: Number.MAX_VALUE,
    expected: [1, 0]
  },
  {
    x: -Number.MIN_VALUE,
    y: Number.MAX_VALUE,
    expected: [0, 0]
  },
  {
    x: -0,
    y: Number.MAX_VALUE,
    expected: [0, 0]
  },
  {
    x: 0,
    y: Number.MAX_VALUE,
    expected: [0, 0]
  },
  {
    x: Number.MIN_VALUE,
    y: Number.MAX_VALUE,
    expected: [0, 0]
  },
  {
    x: 1 + Number.EPSILON * -0.5,
    y: Number.MAX_VALUE,
    expected: [0, 0]
  },
  {
    x: 1,
    y: Number.MAX_VALUE,
    expected: [1, 0]
  },
  {
    x: 1 + Number.EPSILON * 1,
    y: Number.MAX_VALUE,
    expected: [Infinity, Infinity]
  },
  {
    x: Number.MAX_VALUE,
    y: Number.MAX_VALUE,
    expected: [Infinity, Infinity]
  },
  {
    x: Infinity,
    y: Number.MAX_VALUE,
    expected: [Infinity, Infinity]
  },
  {
    x: NaN,
    y: Number.MAX_VALUE,
    expected: [NaN, NaN]
  },
  {
    x: -Infinity,
    y: Infinity,
    expected: [Infinity, Infinity]
  },
  {
    x: -Number.MAX_VALUE,
    y: Infinity,
    expected: [Infinity, Infinity]
  },
  {
    x: -1,
    y: Infinity,
    expected: [1, 0]
  },
  {
    x: -Number.MIN_VALUE,
    y: Infinity,
    expected: [0, 0]
  },
  {
    x: -0,
    y: Infinity,
    expected: [0, 0]
  },
  {
    x: 0,
    y: Infinity,
    expected: [0, 0]
  },
  {
    x: Number.MIN_VALUE,
    y: Infinity,
    expected: [0, 0]
  },
  {
    x: 1 + Number.EPSILON * -0.5,
    y: Infinity,
    expected: [0, 0]
  },
  {
    x: 1,
    y: Infinity,
    expected: [1, 0]
  },
  {
    x: 1 + Number.EPSILON * 1,
    y: Infinity,
    expected: [Infinity, Infinity]
  },
  {
    x: Number.MAX_VALUE,
    y: Infinity,
    expected: [Infinity, Infinity]
  },
  {
    x: Infinity,
    y: Infinity,
    expected: [Infinity, Infinity]
  },
  {
    x: NaN,
    y: Infinity,
    expected: [NaN, NaN]
  },
  {
    x: -Infinity,
    y: NaN,
    expected: [NaN, NaN]
  },
  {
    x: -Number.MAX_VALUE,
    y: NaN,
    expected: [NaN, NaN]
  },
  {
    x: -1,
    y: NaN,
    expected: [NaN, NaN]
  },
  {
    x: -Number.MIN_VALUE,
    y: NaN,
    expected: [NaN, NaN]
  },
  {
    x: -0,
    y: NaN,
    expected: [NaN, NaN]
  },
  {
    x: 0,
    y: NaN,
    expected: [NaN, NaN]
  },
  {
    x: Number.MIN_VALUE,
    y: NaN,
    expected: [NaN, NaN]
  },
  {
    x: 1 + Number.EPSILON * -0.5,
    y: NaN,
    expected: [NaN, NaN]
  },
  {
    x: 1,
    y: NaN,
    expected: [1, 0]
  },
  {
    x: 1 + Number.EPSILON * 1,
    y: NaN,
    expected: [NaN, NaN]
  },
  {
    x: Number.MAX_VALUE,
    y: NaN,
    expected: [NaN, NaN]
  },
  {
    x: Infinity,
    y: NaN,
    expected: [NaN, NaN]
  },
  {
    x: NaN,
    y: NaN,
    expected: [NaN, NaN]
  },
  {
    x: 2,
    y: -0.5,
    expected: [0.70710678118654757, -4.8336466567264567e-17]
  },
  {
    x: 2,
    y: 0.5,
    expected: [1.4142135623730951, -9.6672933134529135e-17]
  },
  {
    x: -2,
    y: 8 + Number.EPSILON * -4,
    expected: [NaN, NaN]
  },
  {
    x: -2,
    y: 8,
    expected: [256, 0]
  },
  {
    x: -2,
    y: 8 + Number.EPSILON * 8,
    expected: [NaN, NaN]
  },
  {
    x: -2,
    y: 8.5,
    expected: [NaN, NaN]
  },

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // random cases
  {
    x: 1.3047111943711744,
    y: 27.641778004727584,
    expected: [1559.6354100771455, -1.1522941983822058e-14]
  },
  {
    x: 1.9140980097067963,
    y: 4.1729560063300823,
    expected: [15.018414407494026, -2.3308439506231906e-16]
  },
  {
    x: 0.050578720661562215,
    y: -5.456068894417669,
    expected: [11782589.675502695, 5.9479599847399076e-10]
  },
  {
    x: 0.0009484431061750967,
    y: 15.680307012195826,
    expected: [3.9683396978048675e-48, 6.3812915353566531e-65]
  },
  {
    x: 7562075.8711896129,
    y: 10.679337966357878,
    expected: [2.8796009796275855e+73, -2.6483414217969223e+56]
  },
  {
    x: 584.18573997480325,
    y: -39.113289293389968,
    expected: [6.181477391185297e-109, 3.15770359893632e-126]
  },
  {
    x: 2.3682159366045826e-05,
    y: 27.000285644099094,
    expected: [1.2824894828115652e-125, 2.2101117036778635e-142]
  },
  {
    x: 0.00023507347559296006,
    y: -42.379047093873751,
    expected: [6.0944191933836684e+153, 1.7483144403072857e+137]
  },
  {
    x: 453.71419458174432,
    y: -22.815411444668683,
    expected: [2.4233558374103693e-61, 8.4049765612738264e-78]
  },
  {
    x: 14668.605370742207,
    y: -2.2720756026020439,
    expected: [3.4170363591626608e-10, -1.0833945874505004e-26]
  },
  {
    x: 1.0526151364773553e-07,
    y: -16.611031334243435,
    expected: [8.077893748573521e+115, -5.9213057508586822e+99]
  },
  {
    x: 455.73488503457759,
    y: 28.694878796278601,
    expected: [1.9562594277464027e+76, -2.6294339316164692e+59]
  },
  {
    x: 4.6245443935058643e-08,
    y: -28.275243049498499,
    expected: [2.4943541219274433e+207, -1.1488123589109085e+191]
  },
  {
    x: 7.1337796019246298,
    y: 27.077911311323504,
    expected: [1.276776331687205e+23, -2145092.3732876228]
  },
  {
    x: 0.31866082153318365,
    y: 9.6138562209087866,
    expected: [1.6790872283986175e-05, -6.3882020513470331e-22]
  },
  {
    x: 3998764.7123565562,
    y: 23.739393994528825,
    expected: [5.3176395844429722e+156, -1.9627308378458685e+140]
  },
  {
    x: 27372387.012826197,
    y: -8.7539774103556027,
    expected: [7.8330856903961508e-66, 3.8117247908028702e-82]
  },
  {
    x: 0.00061992258282632731,
    y: -37.343985889887975,
    expected: [6.1221608156798034e+119, 1.3273881948313293e+103]
  },
  {
    x: 278881.92492566409,
    y: 26.053876659603873,
    expected: [7.4870479077011772e+141, 4.4985755223422746e+125]
  },
  {
    x: 1.8770617389575467e-07,
    y: -0.055869700070971362,
    expected: [2.3757937501226571, -2.2181952479249883e-20]
  },
  {
    x: 0.021925965763303912,
    y: -15.160478041956722,
    expected: [1.4185959633908623e+25, -936095511.26023436]
  },
  {
    x: 1.727573649804139,
    y: 5.2071663508451138,
    expected: [17.233429993892965, -7.1303957261223541e-16]
  },
  {
    x: 0.00032323321356872718,
    y: -18.904813345203479,
    expected: [9.7039574369501992e+65, 7.8361548198986556e+49]
  },
  {
    x: 181.88319599631438,
    y: 31.567709690907591,
    expected: [2.1700814218440273e+71, 4.7703278651799293e+54]
  },
  {
    x: 7.6184046197911092e-09,
    y: -45.606803926850333,
    expected: [Infinity, Infinity]
  },
  {
    x: 0.010861353561580071,
    y: 47.520763031284929,
    expected: [4.6100610705741646e-94, 2.5126119972997166e-110]
  },
  {
    x: 29.859778967172701,
    y: -4.9012724362339384,
    expected: [5.891132113422461e-08, -2.9668913793020613e-24]
  },
  {
    x: 0.015703677026714186,
    y: -40.141803551768334,
    expected: [2.604709107886603e+72, -5.9725092193831667e+55]
  },
  {
    x: 8.4851320451639793,
    y: 11.132772108677301,
    expected: [21804423980.188454, -5.02835390631656e-07]
  },
  {
    x: 0.00022293610076540066,
    y: 22.000338356272039,
    expected: [4.5575684860920419e-81, -4.409277416281622e-97]
  },
  {
    x: 565.00548755488489,
    y: -22.658847451605894,
    expected: [4.3818596700627346e-63, 3.1733102353565959e-80]
  },
  {
    x: 40.492763573645902,
    y: 6.6603633919293088,
    expected: [50782924822.294312, 1.0668039613239157e-06]
  },
  {
    x: 10.419061991942172,
    y: -7.7409910730318501,
    expected: [1.3212887066677938e-08, -1.2951524918117183e-25]
  },
  {
    x: 10.800233338300018,
    y: 18.465755243101796,
    expected: [1.2109421479681929e+19, 532.0603227039195]
  },
  {
    x: 15450200.976562385,
    y: 12.258652310320159,
    expected: [1.3385790376033015e+88, -8.1118222344767829e+71]
  },
  {
    x: 3303814.7508548005,
    y: 16.72265251418942,
    expected: [1.0357002545236291e+109, -3.3979788455263718e+92]
  },
  {
    x: 0.00066984523333203281,
    y: -50.459667889238659,
    expected: [1.4463521744579074e+160, 1.3588218522256876e+144]
  },
  {
    x: 0.015722070198027113,
    y: -32.366210025026817,
    expected: [2.3558347479543708e+58, -1.2546339365898084e+42]
  },
  {
    x: 8.2759442197588562e-09,
    y: 36.001669094469989,
    expected: [1.0664538052045027e-291, -1.5660630079771183e-308]
  },
  {
    x: 0.96322955991400039,
    y: -3.1033442706246177,
    expected: [1.1232903451525165, -5.4063017549472422e-17]
  },
  {
    x: 6.1678834942185539,
    y: 6.163791804708211,
    expected: [74171.113341264863, -6.200137490298327e-12]
  },
  {
    x: 0.34429727845079405,
    y: -17.57358521495307,
    expected: [137321019.89612386, 1.8560994900461075e-09]
  },
  {
    x: 462.09270225821422,
    y: -23.93618739282968,
    expected: [1.6464353256415141e-64, 1.361381339148132e-80]
  },
  {
    x: 5276.0860436521907,
    y: -13.587546090380428,
    expected: [2.6479873757661218e-51, 5.5934539918931888e-68]
  },
  {
    x: 0.025830552532319112,
    y: 34.153174068366496,
    expected: [5.8793014189725993e-55, 5.3318851414620385e-73]
  },
  {
    x: 2.7070187336526939,
    y: -33.630158267969819,
    expected: [2.8526627680261828e-15, -5.0863156728642882e-32]
  },
  {
    x: 6.3281971932880072,
    y: -10.152704503676418,
    expected: [7.3255611332916444e-09, -3.2111593745717219e-25]
  },
  {
    x: 1214.4946954213128,
    y: 25.429991256924197,
    expected: [2.7299438037990388e+78, 7.1536720901538369e+60]
  },
  {
    x: 2318.8725737798404,
    y: 11.536062965309313,
    expected: [6.638134227353177e+38, -3.667736840148839e+21]
  },
  {
    x: 4.1666228718858225e-06,
    y: 18.017164003473681,
    expected: [1.1581623438257288e-97, -5.6684176580509315e-114]
  },
  {
    x: 0.22609538862556178,
    y: -6.9960007418512049,
    expected: [32913.62471674024, 7.7501761890551723e-13]
  },
  {
    x: 0.00010103999002062302,
    y: 14.59837640399715,
    expected: [4.6999062023464323e-59, 4.2068310071235372e-75]
  },
  {
    x: 661499.54615072999,
    y: 14.166236666870986,
    expected: [2.851012620009012e+82, -1.2476688645122018e+66]
  },
  {
    x: 0.055951748076145891,
    y: -37.865079650218632,
    expected: [2.5949889809514332e+47, 1.9060222992325182e+31]
  },
  {
    x: 1.9344235502683166e-07,
    y: 14.984019529486019,
    expected: [2.5442373649513143e-101, -8.2505739586100308e-118]
  },
  {
    x: 2.7295506827479015,
    y: -30.925758673046261,
    expected: [3.2624956461389485e-14, -3.0079134100941593e-30]
  },
  {
    x: 53690.867581846484,
    y: 28.574881318401694,
    expected: [1.4333201234451696e+135, -2.8462969282388885e+118]
  },
  {
    x: 1.8438448493951872e-05,
    y: 48.441818772263758,
    expected: [4.6033938228125371e-230, -3.6017062329352695e-246]
  },
  {
    x: 0.003464309941349962,
    y: -40.853568622247195,
    expected: [3.2766974666761407e+100, 1.0008559099042533e+84]
  },
  {
    x: 0.00038500257498341739,
    y: 31.181000369340239,
    expected: [3.3989150959079073e-107, 2.7212169347361326e-123]
  },
  {
    x: 24.819560870070518,
    y: 3.3635663599609558,
    expected: [49145.356672375376, -2.2681358585293276e-12]
  },
  {
    x: 0.14369787705475134,
    y: -14.826377460217572,
    expected: [3104267294690.3691, -0.00014641883222921899]
  },
  {
    x: 0.00032491104708004125,
    y: 11.345603936606636,
    expected: [2.6537580643407381e-40, -1.4637928992948464e-56]
  },
  {
    x: 803534424.02355123,
    y: 4.7910316171531662,
    expected: [4.6148548745552934e+42, 1.7753322204179032e+25]
  },
  {
    x: 0.04815012679245495,
    y: -22.038203254051425,
    expected: [1.0794076536631327e+29, 2406557075593.5117]
  },
  {
    x: 0.00064654228688653358,
    y: -32.614068412785869,
    expected: [1.0457063776915169e+104, -4.449950413815812e+87]
  },
  {
    x: 1730.4356808934863,
    y: 13.086863828738274,
    expected: [2.3839633856714338e+42, -9.8918554738168864e+25]
  },
  {
    x: 57527.319141169311,
    y: -14.232608011973994,
    expected: [1.7971206721205524e-68, 9.7769208757132748e-85]
  },
  {
    x: 0.61319694585202655,
    y: 21.124410781632946,
    expected: [3.2596786873138761e-05, -2.3794644507084588e-21]
  },
  {
    x: 0.012697253624436012,
    y: -16.589710644302855,
    expected: [2.876774399238458e+31, 2092184775458233.5]
  },
  {
    x: 0.052320494210272545,
    y: 10.60016017882711,
    expected: [2.6164728762847478e-14, 2.649497849153652e-31]
  },
  {
    x: 38351.044960673971,
    y: 40.541570273122957,
    expected: [6.8159366023578109e+185, -2.4689207109137688e+169]
  },
  {
    x: 0.066237925044842827,
    y: -13.360034243000356,
    expected: [5624120252609046, -0.37217670082829579]
  },
  {
    x: 0.00040765826012726086,
    y: 4.8452296275021638,
    expected: [3.7679657415516957e-17, -1.9464525270196938e-33]
  },
  {
    x: 3.6692432883548385,
    y: 19.407352854361235,
    expected: [90559812345.738693, 3.354749627388498e-06]
  },
  {
    x: 0.0074152558878063397,
    y: -52.154158734180825,
    expected: [1.2072000754914344e+111, -7.367976705754988e+94]
  },
  {
    x: 0.0011608045111454282,
    y: -15.343233554158942,
    expected: [1.086642940338767e+45, 9.8618537393712124e+27]
  },
  {
    x: 0.00046788253204639368,
    y: 3.5758491063900379,
    expected: [1.2385449263572345e-12, -3.9234472965951432e-30]
  },
  {
    x: 3.9168854118347246e-10,
    y: 20.965333793198496,
    expected: [5.9960501074256562e-198, 1.3489651390054715e-215]
  },
  {
    x: 0.74941085197265123,
    y: -0.87219984559369834,
    expected: [1.2860836471891093, 2.0781316478094298e-17]
  },
  {
    x: 7.5408945365975518e-06,
    y: -25.998468928158445,
    expected: [1.5106450243959861e+133, -9.2838847502916508e+116]
  },
  {
    x: 0.17430083187457523,
    y: 2.206627643615704,
    expected: [0.02117534110179245, 7.171534872004383e-19]
  },
  {
    x: 839.93172633257109,
    y: 35.699085163425949,
    expected: [2.4707857821248521e+104, 1.098100386875659e+87]
  },
  {
    x: 0.0041237377343992312,
    y: 22.067449946365329,
    expected: [2.3744023739695649e-53, -1.301516237059881e-69]
  },
  {
    x: 3.3485483812477464e-06,
    y: 4.1256209795168246,
    expected: [2.5800815497362989e-23, -7.4731971900184743e-40]
  },
  {
    x: 5.7182614031186538e-09,
    y: -2.7268004534046071,
    expected: [2.99430647384065e+22, 2024104.6974098007]
  },
  {
    x: 0.18259183176411509,
    y: -18.827091284096866,
    expected: [80197000161504.062, 0.0038376739479301565]
  },
  {
    x: 29015.848009292153,
    y: 23.114419521617819,
    expected: [1.4165233852036358e+103, 6.7752702565147815e+86]
  },
  {
    x: 3.2155899460220092e-06,
    y: -7.8830564749213892,
    expected: [1.9933079670585148e+43, 6.9622126417681954e+25]
  },
  {
    x: 156529.3918012043,
    y: 34.920241733838225,
    expected: [2.4919794706985801e+181, 6.4415266664243928e+164]
  },
  {
    x: 3.7551651989504125,
    y: 52.726987553834107,
    expected: [1.9881934219488347e+30, 97874850890830.453]
  },
  {
    x: 6.7650311804075741e-08,
    y: 31.289469214236348,
    expected: [4.602011661968085e-225, 2.829698388815513e-241]
  },
  {
    x: 1.4235613596456913,
    y: -13.603049145417984,
    expected: [0.008196267666302463, 5.6778563860820148e-19]
  },
  {
    x: 648.56985758290875,
    y: -11.895946583916526,
    expected: [3.5408911491504106e-34, 9.7889438849353915e-51]
  },
  {
    x: 1428.9493017832006,
    y: -14.358507147390796,
    expected: [4.9965292218333403e-46, -3.5305715734791047e-62]
  },
  {
    x: 14437.457987611087,
    y: 2.7320853375614575,
    expected: [231251013402.64984, 1.2432530750302352e-06]
  },
  {
    x: 224.41318060083086,
    y: 27.71969213724887,
    expected: [1.480255786245951e+65, 4.063359175126075e+48]
  },
  {
    x: 0.0077390031432258352,
    y: -31.206988998584265,
    expected: [7.7229506239564958e+65, 2.9360495134494821e+49]
  },
  {
    x: 0.037959682610820888,
    y: 10.173777481865216,
    expected: [3.5183900149606165e-15, 1.701816925589285e-31]
  },
  {
    x: 138052568.77911097,
    y: -30.742422304110278,
    expected: [5.6926521929194294e-251, 2.8359443455095342e-267]
  },

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  // difficult cases
  {
    x: 1 + Number.EPSILON * 1,
    y: 3.1965771613006638e+18,
    expected: [1.7976931348621315e+308, 6.4460005104725047e+291]
  },
  {
    x: 1 + Number.EPSILON * 1,
    y: -3.1903338465324984e+18,
    expected: [2.2250738585074375e-308, -0]
  },
  {
    x: 1 + Number.EPSILON * 1,
    y: -3.3557816878888806e+18,
    expected: [4.9406564584124654e-324, -0]
  },
  {
    x: 1 + Number.EPSILON * -0.5,
    y: -6.3931543226013266e+18,
    expected: [1.7976931348621397e+308, -5.9054981508139448e+289]
  },
  {
    x: 1 + Number.EPSILON * -0.5,
    y: 6.3806676930649958e+18,
    expected: [2.2250738585074282e-308, -0]
  },
  {
    x: 1 + Number.EPSILON * -0.5,
    y: 6.7115633757777603e+18,
    expected: [4.9406564584124654e-324, -0]
  },
  {
    x: 1.4142135623730951,
    y: 2047.9999999999995,
    expected: [1.7976931348622842e+308, 8.3566364775149123e+291]
  },
  {
    x: 1.4142135623730951,
    y: -2043.9999999999995,
    expected: [2.2250738585072414e-308, -0]
  },
  {
    x: 1.4142135623730951,
    y: -2149.9999999999995,
    expected: [4.9406564584124654e-324, -0]
  },
];

module.exports = {
  ROUND,
  SQRT,
  TRIG,
  ASIN_ACOS,
  ATAN,
  TO_POLAR,
  EXP,
  LOG,
  POW
};
